jenkins-bot merged this change.
[cleanup] reduce code complexity of generate_user_files.create_user_config
Saving botpassword becomes its own function
Change-Id: I048be05ecdc3424a8693686cc3bb8821a74e3677
---
M generate_user_files.py
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/generate_user_files.py b/generate_user_files.py
index 36decb8..3358336 100755
--- a/generate_user_files.py
+++ b/generate_user_files.py
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
"""Script to create user-config.py."""
#
-# (C) Pywikibot team, 2010-2018
+# (C) Pywikibot team, 2010-2019
#
# Distributed under the terms of the MIT license.
#
@@ -371,6 +371,11 @@
os.remove(_fnc)
raise
+ save_botpasswords(botpasswords, _fncpass)
+
+
+def save_botpasswords(botpasswords, _fncpass):
+ """Write botpasswords to file."""
if botpasswords:
# Save user-password.py if necessary
# user-config.py is already created at this point
To view, visit change 510699. To unsubscribe, or for help writing mail filters, visit settings.