From 214c2f1d425d7d9a9fe5ecb95fc8dcaf540d6821 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 18 Jul 2017 17:36:10 +0200 Subject: [PATCH] Fix wrong host parsing --- parseurl.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/parseurl.py b/parseurl.py index 2a23e8d..78e6a92 100755 --- a/parseurl.py +++ b/parseurl.py @@ -18,19 +18,19 @@ db_host = None db_port = None if db_netloc.find("@") >= 0 : - tmp_arr = db_netloc.split('@') - db_credential = tmp_arr[0] - db_host = tmp_arr[1] + tmp_arr1 = db_netloc.split('@') + db_credential = tmp_arr1[0] + db_host = tmp_arr1[1] if db_credential and db_credential.find(':') >= 0 : - tmp_arr = db_credential.split(':') - db_username = tmp_arr[0] - db_password = tmp_arr[1] + tmp_arr2 = db_credential.split(':') + db_username = tmp_arr2[0] + db_password = tmp_arr2[1] if db_host and db_host.find(':') >= 0 : - tmp_arr = db_credential.split(':') - db_host = tmp_arr[0] - db_port = tmp_arr[1] + tmp_arr3 = db_host.split(':') + db_host = tmp_arr3[0] + db_port = tmp_arr3[1] db_path = uri.path db_scheme = uri.scheme