diff options
Diffstat (limited to 'modules/pgsql.py')
-rw-r--r-- | modules/pgsql.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/pgsql.py b/modules/pgsql.py index 24cec76..a09a6de 100644 --- a/modules/pgsql.py +++ b/modules/pgsql.py @@ -1,5 +1,5 @@ from . import ModuleBase -from pyPgSQL import PgSQL +import psycopg2 class Module(ModuleBase): def __init__(self, manager): @@ -17,12 +17,12 @@ class Module(ModuleBase): except: pass - self.db = PgSQL.connect(host = self.conf['host'], user = self.conf['user'], password = self.conf['passwd'], database = self.conf['db'], client_encoding = 'utf8', unicode_results = 1) + self.db = psycopg2.connect(host = self.conf['host'], user = self.conf['user'], password = self.conf['passwd'], database = self.conf['db']) def cursor(self): try: return self.db.cursor() - except PgSQL.OperationalError: + except psycopg2.OperationalError: self._connect() return self.db.cursor() |