diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-08-17 09:55:05 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-08-17 10:27:09 +0000 |
commit | cdadcbe045db5a66cf71b749a9613b901b4316f8 (patch) | |
tree | 48ed798d700fadafdcd5d820590a094040fd5448 | |
parent | 91d398497c785153740c0f9fc5728246a9ee5bce (diff) | |
download | jenkins.debian.net-cdadcbe045db5a66cf71b749a9613b901b4316f8.tar.xz |
reproducible: common.py: use the keyword syntax instead of libpq string to connect to udd
-rwxr-xr-x | bin/reproducible_common.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 8eae0950..e51afd7c 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -321,10 +321,12 @@ def start_udd_connection(): db = "udd" try: log.debug("Starting connection to the UDD database") - conn = psycopg2.connect("dbname=" + db + - " user=" + username + - " host=" + host + - " password=" + password) + conn = psycopg2.connect( + database=db, + user=username, + host=host, + password=password + ) except: log.error('Erorr connecting to the UDD database replica.' + 'The full error is:') |