ArielGlenn has submitted this change and it was merged.

Change subject: really fix db_user and db_password issue
......................................................................


really fix db_user and db_password issue

config file processing of these params should not blank
out values previously obtained from adminsettings, but the
vars do need to be intialized somewhere, do it
before anything else tries to touch them

Change-Id: If3ebda4f37b0a6604b01d233b63d286f4beb06b9
---
M xmldumps-backup/dumps/WikiDump.py
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index 7f1e910..01a1cfb 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -14,6 +14,8 @@
 class Config(object):
     def __init__(self, config_file=False):
         self.project_name = False
+        self.db_user = None
+        self.db_password = None
 
         home = os.path.dirname(sys.argv[0])
         if not config_file:
@@ -271,13 +273,9 @@
         dbuser = self.get_opt_for_proj_or_default(conf, "database", "user", 0)
         if dbuser:
             self.db_user = dbuser
-        else:
-            self.db_user = None
         dbpassword = self.get_opt_for_proj_or_default(conf, "database", 
"password", 0)
         if dbpassword:
             self.db_password = dbpassword
-        else:
-            self.db_password = None
         max_allowed_packet = self.get_opt_for_proj_or_default(
             conf, "database", "max_allowed_packet", 0)
         if max_allowed_packet:

-- 
To view, visit https://gerrit.wikimedia.org/r/324694
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If3ebda4f37b0a6604b01d233b63d286f4beb06b9
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn <ar...@wikimedia.org>
Gerrit-Reviewer: ArielGlenn <ar...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to