From: Fred Date: Sat, 28 Jul 2012 15:45:41 +0000 (+0800) Subject: Prettyfied dict X-Git-Tag: v0.1~98 X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=4d4367359734d8694308cea66995ad3448c0f96b;p=mdk.git Prettyfied dict --- diff --git a/lib/db.py b/lib/db.py index 30151c0..7ff9b4b 100644 --- a/lib/db.py +++ b/lib/db.py @@ -16,22 +16,22 @@ class DB(): if engine == 'mysqli': import pymysql self.conn = pymysql.connect( - host=options['host'], - port=int(options['port']), - user=options['user'], - passwd=options['passwd'], - db=None + host = options['host'], + port = int(options['port']), + user = options['user'], + passwd = options['passwd'], + db = None ) self.cur = self.conn.cursor() elif engine == 'pgsql': from bpgsql import bpgsql self.conn = bpgsql.connect( - host=str(options['host']), - port=str(options['port']), - username=str(options['user']), - password=str(options['passwd']), - dbname='' + host = str(options['host']), + port = str(options['port']), + username = str(options['user']), + password = str(options['passwd']), + dbname = '' ) self.cur = self.conn.cursor()