jenkins-bot merged this change.
config2.py: Remove an unnecessary for loop
_fns is either empty or has a single item. Only run the block of code
if it is not empty and using its only _filename.
Change-Id: I4c1f07405c868d02ca009808cd95d44bbd214f9e
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 8b42641..0baeedf 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -1039,10 +1039,8 @@
if __no_user_config:
if __no_user_config != '2':
warning('Skipping loading of user-config.py.')
- _fns = []
else:
- _fns = [os.path.join(base_dir, 'user-config.py')]
-for _filename in _fns:
+ _filename = os.path.join(base_dir, 'user-config.py')
if os.path.exists(_filename):
_filestatus = os.stat(_filename)
_filemode = _filestatus[0]
To view, visit change 489142. To unsubscribe, or for help writing mail filters, visit settings.