File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,12 @@ import urllib.request as urlrequest
3333missing_modules = []
3434
3535try :
36- import psycopg2
36+ import psycopg2 as psycopg
3737except ImportError :
38- missing_modules .append ('psycopg2' )
38+ try :
39+ import psycopg
40+ except ImportError :
41+ missing_modules .append ('psycopg2' )
3942
4043try :
4144 from osmium .replication .server import ReplicationServer
@@ -72,8 +75,8 @@ def pretty_format_timedelta(seconds):
7275def connect (args ):
7376 """ Create a connection from the given command line arguments.
7477 """
75- return psycopg2 .connect (dbname = args .database , user = args .username ,
76- host = args .host , port = args .port )
78+ return psycopg .connect (dbname = args .database , user = args .username ,
79+ host = args .host , port = args .port )
7780
7881
7982def compute_database_date (conn , prefix ):
You can’t perform that action at this time.
0 commit comments