jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/850996 )
Change subject: [fix] use __file__ to calculate the pwb.py origin path ......................................................................
[fix] use __file__ to calculate the pwb.py origin path
Bug: T321452 Change-Id: I238f143036e8698c71488236ee01418c0458377a --- M pwb.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py index 5cf60f1..c01f42f 100755 --- a/pwb.py +++ b/pwb.py @@ -8,6 +8,7 @@ # # Distributed under the terms of the MIT license. # +import runpy import sys
VERSIONS_REQUIRED_MESSAGE = """ @@ -29,9 +30,8 @@
def main(): """Entry point for :func:`tests.utils.execute_pwb`.""" - import runpy from pathlib import Path - path = Path().resolve() / 'pywikibot' / 'scripts' / 'wrapper.py' + path = Path(__file__).parent / 'pywikibot' / 'scripts' / 'wrapper.py' runpy.run_path(str(path), run_name='__main__')
pywikibot-commits@lists.wikimedia.org