jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] config2: Support unicode args
......................................................................
[FIX] config2: Support unicode args
With 1e54a7d6 strings like '-dir' are unicode and whenever two strings
are compared and one of them is unicode one of them gets converted. In
this case the argument got converted into unicode using the ASCII codec
which fails if there are non-ASCII entries. This forces '-dir' back into
unicode.
Bug: T95803
Change-Id: Ib899ca2d8a84e5580f095046e91cdd5745da76c0
---
M pywikibot/config2.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index dbb1c28..4610e72 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -219,7 +219,7 @@
base_dir = ""
for arg in sys.argv[1:]:
- if arg.startswith("-dir:"):
+ if arg.startswith(str('-dir:')):
base_dir = arg[5:]
base_dir = os.path.expanduser(base_dir)
break
--
To view, visit
https://gerrit.wikimedia.org/r/203652
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib899ca2d8a84e5580f095046e91cdd5745da76c0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>