jenkins-bot merged this change.
[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(-)
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 change 510687. To unsubscribe, or for help writing mail filters, visit settings.