jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/853493 )
Change subject: [BUGFIX] re-enable running scripts in userscripts folder via pwb wrapper
......................................................................
[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(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
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
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/853493
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I2c440f1a84cf86dba42e14e2ae3955fc896fcad6
Gerrit-Change-Number: 853493
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged