diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-06-04 14:21:18 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2011-06-04 14:21:18 +0100 |
commit | 62a8ef308a664ee8c6251cfba27da7fe6fef2d8e (patch) | |
tree | 93d85218681fb3723e13afe0ba2e2652dae59508 /lib/__init__.py | |
parent | c8ec747903a4d0063d88fdd38cb18b50303daaa7 (diff) | |
download | psycopg2-62a8ef308a664ee8c6251cfba27da7fe6fef2d8e.tar.gz |
Fixed version check
Diffstat (limited to 'lib/__init__.py')
-rw-r--r-- | lib/__init__.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/__init__.py b/lib/__init__.py index 48a9847..3831210 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -40,20 +40,16 @@ Homepage: http://initd.org/projects/psycopg2 # Import modules needed by _psycopg to allow tools like py2exe to do # their work without bothering about the module dependencies. -# -# TODO: we should probably use the Warnings framework to signal a missing -# module instead of raising an exception (in case we're running a thin -# embedded Python or something even more devious.) import sys, warnings -if sys.version_info[0] >= 2 and sys.version_info[1] >= 3: +if sys.version_info >= (2, 3): try: import datetime as _psycopg_needs_datetime except: warnings.warn( "can't import datetime module probably needed by _psycopg", RuntimeWarning) -if sys.version_info[0] >= 2 and sys.version_info[1] >= 4: +if sys.version_info >= (2, 4): try: import decimal as _psycopg_needs_decimal except: |