Skip to content

Commit

Permalink
Merge pull request #45 from gratipay/import-tweak
Browse files Browse the repository at this point in the history
use cleaner test for Python major version
  • Loading branch information
Changaco committed Mar 11, 2015
2 parents bb4e7b4 + 22015bc commit e818e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postgres/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import sys
try: # Python 2
if sys.version_info[0] == 2: # Python 2
import urlparse

# "Note: In Python 2, if you want to uniformly receive all your database
Expand All @@ -169,7 +169,7 @@
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)

except ImportError: # Python 3
else: # Python 3
import urllib.parse as urlparse
from collections import namedtuple

Expand Down

0 comments on commit e818e10

Please sign in to comment.