def close_connection(self, connection, force=False):
        """overriding the baseclass function, this routine will decline to
        close a connection at the end of a transaction context.  This allows
        for reuse of connections."""
        if force:
            print('PostgresPooled - delegating connection closure')
            try:
                super(PostgresPooled, self).close_connection(connection,
                                                                  force)
            except self.operational_exceptions:
                print('PostgresPooled - failed closing')
            for name, conn in self.pool.iteritems():
                if conn is connection:
                    break
            del self.pool[name]
        else:
            print('PostgresPooled - refusing to close connection')
def close_connection ( self , connection , force = False ) : if force : print ( 'PostgresPooled - delegating connection closure' ) try : super ( PostgresPooled , self ) . close_connection ( connection , force ) except self . operational_exceptions : print ( 'PostgresPooled - failed closing' ) for name , conn in self . pool . iteritems ( ) : if conn is connection : break del self . pool [ name ] else : print ( 'PostgresPooled - refusing to close connection' )
overriding the baseclass function, this routine will decline to
        close a connection at the end of a transaction context.  This allows
        for reuse of connections.