some silly cleanup
This commit is contained in:
parent
80c3922bc0
commit
8e5396295d
|
@ -23,12 +23,12 @@ import FpdbSQLQueries
|
||||||
class fpdb_db:
|
class fpdb_db:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Simple constructor, doesnt really do anything"""
|
"""Simple constructor, doesnt really do anything"""
|
||||||
self.db=None
|
self.db = None
|
||||||
self.cursor=None
|
self.cursor = None
|
||||||
self.sql = {}
|
self.sql = {}
|
||||||
self.MYSQL_INNODB=2
|
self.MYSQL_INNODB = 2
|
||||||
self.PGSQL=3
|
self.PGSQL = 3
|
||||||
self.SQLITE=4
|
self.SQLITE = 4
|
||||||
#end def __init__
|
#end def __init__
|
||||||
|
|
||||||
def do_connect(self, config=None):
|
def do_connect(self, config=None):
|
||||||
|
@ -37,10 +37,7 @@ class fpdb_db:
|
||||||
raise FpdbError('Configuration not defined')
|
raise FpdbError('Configuration not defined')
|
||||||
|
|
||||||
self.settings = {}
|
self.settings = {}
|
||||||
if (os.sep=="/"):
|
self.settings['os'] = "linuxmac" if os.name != "nt" else "windows"
|
||||||
self.settings['os']="linuxmac"
|
|
||||||
else:
|
|
||||||
self.settings['os']="windows"
|
|
||||||
|
|
||||||
self.settings.update(config.get_db_parameters())
|
self.settings.update(config.get_db_parameters())
|
||||||
self.connect(self.settings['db-backend'],
|
self.connect(self.settings['db-backend'],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user