Fixed version check in ZPsycopgDA

This commit is contained in:
Federico Di Gregorio 2009-05-19 10:14:49 +02:00
parent 091102a919
commit e5a696ad58
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-05-19 Federico Di Gregorio <fog@initd.org>
* Applied patch from Robert Munro to fix version check
in ZPSycopgDA.
2009-05-10 Federico Di Gregorio <fog@initd.org>
* Release 2.0.11.

View File

@ -116,7 +116,7 @@ class Connection(Shared.DC.ZRDB.Connection.Connection):
pass
# check psycopg version and raise exception if does not match
if psycopg2.__version__[:5] not in ALLOWED_PSYCOPG_VERSIONS:
if psycopg2.__version__.split(' ')[0] not in ALLOWED_PSYCOPG_VERSIONS:
raise ImportError("psycopg version mismatch (imported %s)" %
psycopg2.__version__)