jenkins-bot has submitted this change and it was merged.

Change subject: Changed encoding format
......................................................................


Changed encoding format

Flickrripper.py threw a traceback while testing it on a local machine due
to lack of mentioning of the codec type on line 274. Fixed

Change-Id: I346f8c9824cf27fca6999e1270bd0108855c9f93
---
M pywikibot/version.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/version.py b/pywikibot/version.py
index 028039a..2229075 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -14,6 +14,7 @@
 import time
 import datetime
 import subprocess
+import codecs
 
 import pywikibot.config2 as config
 
@@ -270,7 +271,7 @@
     mtime = None
     fn = os.path.join(_program_dir, filename)
     if os.path.exists(fn):
-        with open(fn, 'r') as f:
+        with codecs.open(fn, 'r', "utf-8") as f:
             for line in f.readlines():
                 if line.find('__version__') == 0:
                     exec(line)

-- 
To view, visit https://gerrit.wikimedia.org/r/181888
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I346f8c9824cf27fca6999e1270bd0108855c9f93
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Anshoe <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to