diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-12-29 02:21:47 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-12-29 02:21:47 +0100 |
commit | 7825748a268683a3afeef06b57a7f9b70e41c410 (patch) | |
tree | adee098cce05f6347ae5a0d4ff155cd77a3a7689 /modules | |
parent | 64efcb0fd8afe3bd208e509b9eca0f227be6edb2 (diff) | |
download | curunir-7825748a268683a3afeef06b57a7f9b70e41c410.tar curunir-7825748a268683a3afeef06b57a7f9b70e41c410.zip |
Diffstat (limited to 'modules')
-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() |