def __init__(self, config, local_config):
        """Initialize the parts needed to start making database connections

        parameters:
            config - the complete config for the app.  If a real app, this
                     would be where a logger or other resources could be
                     found.
            local_config - this is the namespace within the complete config
                           where the actual database parameters are found"""
        super(Postgres, self).__init__()
        self.dsn = ("host=%(database_host)s "
                    "dbname=%(database_name)s "
                    "port=%(database_port)s "
                    "user=%(database_user)s "
                    "password=%(database_password)s") % local_config
        self.operational_exceptions = (FakeDBOperationalError,
                                       socket.timeout)
def __init__ ( self , config , local_config ) : super ( Postgres , self ) . __init__ ( ) self . dsn = ( "host=%(database_host)s " "dbname=%(database_name)s " "port=%(database_port)s " "user=%(database_user)s " "password=%(database_password)s" ) % local_config self . operational_exceptions = ( FakeDBOperationalError , socket . timeout )
Initialize the parts needed to start making database connections

        parameters:
            config - the complete config for the app.  If a real app, this
                     would be where a logger or other resources could be
                     found.
            local_config - this is the namespace within the complete config
                           where the actual database parameters are found