From 8e5396295d39d9c8bd2010f236e31bcdc43eabd5 Mon Sep 17 00:00:00 2001 From: eblade Date: Mon, 16 Mar 2009 20:52:50 -0400 Subject: [PATCH] some silly cleanup --- pyfpdb/fpdb_db.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pyfpdb/fpdb_db.py b/pyfpdb/fpdb_db.py index 6f934819..771b79fa 100644 --- a/pyfpdb/fpdb_db.py +++ b/pyfpdb/fpdb_db.py @@ -23,12 +23,12 @@ import FpdbSQLQueries class fpdb_db: def __init__(self): """Simple constructor, doesnt really do anything""" - self.db=None - self.cursor=None - self.sql = {} - self.MYSQL_INNODB=2 - self.PGSQL=3 - self.SQLITE=4 + self.db = None + self.cursor = None + self.sql = {} + self.MYSQL_INNODB = 2 + self.PGSQL = 3 + self.SQLITE = 4 #end def __init__ def do_connect(self, config=None): @@ -37,10 +37,7 @@ class fpdb_db: raise FpdbError('Configuration not defined') self.settings = {} - if (os.sep=="/"): - self.settings['os']="linuxmac" - else: - self.settings['os']="windows" + self.settings['os'] = "linuxmac" if os.name != "nt" else "windows" self.settings.update(config.get_db_parameters()) self.connect(self.settings['db-backend'],