jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[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(-)

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__')



To view, visit change 850996. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I238f143036e8698c71488236ee01418c0458377a
Gerrit-Change-Number: 850996
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Multichill <maarten@mdammers.nl>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged