Revision: 4845 Author: wikipedian Date: 2008-01-10 14:00:11 +0000 (Thu, 10 Jan 2008)
Log Message: ----------- added check to prevent typos
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-01-10 13:38:18 UTC (rev 4844) +++ trunk/pywikipedia/wikipedia.py 2008-01-10 14:00:11 UTC (rev 4845) @@ -2844,6 +2844,8 @@ if isinstance(exc, str) or isinstance(exc, unicode): # assume it's a reference to the exceptionRegexes dictionary # defined above. + if not exceptionRegexes.has_key(exc): + raise ValueError("Unknown tag type: " + exc) dontTouchRegexes.append(exceptionRegexes[exc]) else: # assume it's a regular expression
pywikipedia-l@lists.wikimedia.org