Fix database dump when port is specified in db uri
Since changeset 01399128964f, the uri port is an integer and so it must be convert to string for command line. issue4490 review6861002
This commit is contained in:
1 parent
21ed4772e5
commit
53194e3784
2 files changed
+4
-4
No files matched your search
@@ -131,7 +131,7 @@ class Database(DatabaseInterface):
|
||||
if uri.hostname:
|
||||
cmd.append('--host=' + uri.hostname)
|
||||
if uri.port:
|
||||
cmd.append('--port=' + uri.port)
|
||||
cmd.append('--port=' + str(uri.port))
|
||||
if uri.password:
|
||||
cmd.append('--password=' + uri.password)
|
||||
cmd.append(database_name)
|
||||
@@ -161,7 +161,7 @@ class Database(DatabaseInterface):
|
||||
if uri.hostname:
|
||||
cmd.append('--host=' + uri.hostname)
|
||||
if uri.port:
|
||||
cmd.append('--port=' + uri.port)
|
||||
cmd.append('--port=' + str(uri.port))
|
||||
if uri.password:
|
||||
cmd.append('--password=' + uri.password)
|
||||
cmd.append(database_name)
|
||||
|
||||
@@ -117,7 +117,7 @@ class Database(DatabaseInterface):
|
||||
if uri.hostname:
|
||||
cmd.append('--host=' + uri.hostname)
|
||||
if uri.port:
|
||||
cmd.append('--port=' + uri.port)
|
||||
cmd.append('--port=' + str(uri.port))
|
||||
if uri.password:
|
||||
# if db_password is set in configuration we should pass
|
||||
# an environment variable PGPASSWORD to our subprocess
|
||||
@@ -151,7 +151,7 @@ class Database(DatabaseInterface):
|
||||
if uri.hostname:
|
||||
cmd.append('--host=' + uri.hostname)
|
||||
if uri.port:
|
||||
cmd.append('--port=' + uri.port)
|
||||
cmd.append('--port=' + str(uri.port))
|
||||
if uri.password:
|
||||
env['PGPASSWORD'] = uri.password
|
||||
cmd.append('--dbname=' + database_name)
|
||||
|
||||
Reference in new issue
Block a user