Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/87652


Change subject: Fix unicode handling for patches
......................................................................

Fix unicode handling for patches

Change-Id: Iafe7b3ab228f8f5136fd03b149fcef78e9e71372
---
M sf.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/sf-export 
refs/changes/52/87652/1

diff --git a/sf.py b/sf.py
index be02203..e254490 100644
--- a/sf.py
+++ b/sf.py
@@ -2,6 +2,7 @@
 """
 Stuff to export data from sf.net
 """
+from __future__ import unicode_literals
 
 import certifi
 import datetime
@@ -205,7 +206,7 @@
         for url in self.iter_attachments():
             r = requests.get(url)
             s = StringIO.StringIO()
-            s.write(r.text)
+            s.write(r.text.encode('utf-8'))
             s.seek(0)  # reset
             yield url, s
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafe7b3ab228f8f5136fd03b149fcef78e9e71372
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/sf-export
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

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

Reply via email to