jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/510687 )
Change subject: [bugfix] fromlist identifiers must not be unicode in Python 2
......................................................................
[bugfix] fromlist identifiers must not be unicode in Python 2
detached from I1d12bfa2
Change-Id: I6186954414192cb51d1364eba780adbc14dc8d99
---
M pywikibot/__init__.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
Zhuyifei1999: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index f032eb1..f7504d3 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -1256,6 +1256,8 @@
if not isinstance(interface, type):
# If it isn't a class, assume it is a string
+ if PY2: # Must not be unicode in Python 2
+ interface = str(interface)
try:
tmp = __import__('pywikibot.site', fromlist=[interface])
except ImportError:
--
To view, visit
https://gerrit.wikimedia.org/r/510687
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6186954414192cb51d1364eba780adbc14dc8d99
Gerrit-Change-Number: 510687
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)