Skip to content

Commit 1889c80

Browse files
committed
Try fixing an import for Python 3
1 parent 9b2d75f commit 1889c80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

postgres.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@
9999
100100
"""
101101
from __future__ import unicode_literals
102-
import urlparse
102+
103+
try: # Python 2
104+
import urlparse
105+
except ImportError: # Python 3
106+
import urllib.parse as urlparse
103107

104108
import psycopg2
105109

0 commit comments

Comments
 (0)