Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/834546 )
Change subject: [IMPR] Keep pwb.py Python 2.7 compatible ......................................................................
[IMPR] Keep pwb.py Python 2.7 compatible
Change-Id: Ief0b54dafc5202ff9cec748ad3fa6183760a606f --- M pwb.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Xqt: Verified; Looks good to me, approved
diff --git a/pwb.py b/pwb.py index d5cd0e9..4878e1d 100755 --- a/pwb.py +++ b/pwb.py @@ -290,6 +290,8 @@ sys.exit(1) except ImportError as e: # raised in textlib sys.exit(e) +except SyntaxError as e: # pragma: no cover + sys.exit(str(e) + '\nProbably outdated Python version')
def find_alternates(filename, script_paths):
pywikibot-commits@lists.wikimedia.org