[Pywikipedia-l] SVN: [5391] trunk/pywikipedia/wikipedia.py

nicdumz at svn.wikimedia.org nicdumz at svn.wikimedia.org
Sat May 17 14:21:52 UTC 2008


Revision: 5391
Author:   nicdumz
Date:     2008-05-17 14:21:52 +0000 (Sat, 17 May 2008)

Log Message:
-----------
* Bug #1965938 "Article 'Loyalit?\195?\164t' in de.wikt throws UTF decoding exception" :
    That article contained an invalid template, {{Loyalit%E4t}}, and it appears
    that incorrect template names were not handled correctly. Indeed,
    "except Error" does not catch _ALL_ Errors. "except Exception", or "except:"
    is needed if you want to catch UnicodeDecodeError

Modified Paths:
--------------
    trunk/pywikipedia/wikipedia.py

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2008-05-17 11:53:49 UTC (rev 5390)
+++ trunk/pywikipedia/wikipedia.py	2008-05-17 14:21:52 UTC (rev 5391)
@@ -1736,7 +1736,7 @@
                     continue
                 try:
                     name = Page(self.site(), name).title()
-                except Error:
+                except:
                     if name.strip():
                         output(
                             u"Page %s contains invalid template name {{%s}}."





More information about the Pywikipedia-l mailing list