jenkins-bot submitted this change.
[BUGFIX] re-enable running scripts in userscripts folder via pwb wrapper
With 935f332 change the scripts.userscripts path for scripts was lost
and pywikibot.scripts was used twice.
Bug: T322479
Change-Id: I2c440f1a84cf86dba42e14e2ae3955fc896fcad6
---
M pywikibot/scripts/wrapper.py
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pywikibot/scripts/wrapper.py b/pywikibot/scripts/wrapper.py
index 4446ae8..d996f02 100755
--- a/pywikibot/scripts/wrapper.py
+++ b/pywikibot/scripts/wrapper.py
@@ -408,21 +408,21 @@
if found: # pragma: no cover
return found
- # search for system scripts in pywikibot.scripts directory
- found = test_paths([''], wrapper_dir)
- if found:
- return found
-
if not site_package:
script_paths = [
+ 'scripts.userscripts',
'scripts',
'scripts.maintenance',
- 'pywikibot.scripts',
]
found = test_paths(script_paths, wrapper_dir.parents[1])
if found:
return found
+ # search for system scripts in pywikibot.scripts directory
+ found = test_paths([''], wrapper_dir)
+ if found:
+ return found
+
return find_alternates(filename, path_list)
To view, visit change 853493. To unsubscribe, or for help writing mail filters, visit settings.