Avoid using keyword arg to decode(), for Python 2.6.
authorAdam Sampson <ats@offog.org>
Sat, 13 Jul 2013 16:36:42 +0000 (16:36 +0000)
committerAdam Sampson <ats@offog.org>
Sat, 13 Jul 2013 16:36:42 +0000 (16:36 +0000)
errors= works with Python 2.7, but not with 2.6. But just passing the
unnamed argument is safe either way.

rawdoglib/feedscanner.py

index 95576880c38aeb72128ac94b2ffca4885eb946d6..a9bc0cddd1deb3e0b8b3f06e762d16c5d0c4dc6b 100644 (file)
@@ -100,7 +100,7 @@ def feeds(page_url):
     f = urllib.urlopen(page_url)
     # Silently ignore encoding errors -- we don't need to go to the bother of
     # detecting the encoding properly (like feedparser does).
-    data = f.read().decode("UTF-8", errors="ignore")
+    data = f.read().decode("UTF-8", "ignore")
     f.close()
 
     parser = FeedFinder(page_url)