Anshoe has uploaded a new change for review.
https://gerrit.wikimedia.org/r/181888
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(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/88/181888/1
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: newchange
Gerrit-Change-Id: I346f8c9824cf27fca6999e1270bd0108855c9f93
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Anshoe <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits