[Pywikipedia-l] SVN: [5760] branches/rewrite/pywikibot/data/api.py
nicdumz at svn.wikimedia.org
nicdumz at svn.wikimedia.org
Fri Jul 25 22:59:42 UTC 2008
Revision: 5760
Author: nicdumz
Date: 2008-07-25 22:59:42 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
Prevent UnicodeDecodeError :)
Modified Paths:
--------------
branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py
===================================================================
--- branches/rewrite/pywikibot/data/api.py 2008-07-25 18:11:07 UTC (rev 5759)
+++ branches/rewrite/pywikibot/data/api.py 2008-07-25 22:59:42 UTC (rev 5760)
@@ -183,6 +183,7 @@
else:
uri = uri + "?" + params
rawdata = http.request(self.site, uri)
+ rawdata = rawdata.decode(self.site.encoding())
except Exception, e: #TODO: what exceptions can occur here?
logger.warning(traceback.format_exc())
print uri, params
More information about the Pywikipedia-l
mailing list