http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9514
Revision: 9514 Author: xqt Date: 2011-09-08 20:05:00 +0000 (Thu, 08 Sep 2011) Log Message: ----------- missing error class added
Modified Paths: -------------- trunk/pywikipedia/tag_nowcommons.py
Modified: trunk/pywikipedia/tag_nowcommons.py =================================================================== --- trunk/pywikipedia/tag_nowcommons.py 2011-09-06 22:51:33 UTC (rev 9513) +++ trunk/pywikipedia/tag_nowcommons.py 2011-09-08 20:05:00 UTC (rev 9514) @@ -20,6 +20,11 @@ from nowcommons import nowCommons from pywikibot import i18n
+ +class NothingFound(pywikibot.Error): + """ An exception indicating that a regex has return [] instead of results.""" + + def main(args): generator = None; always = False @@ -33,7 +38,7 @@
generator = genFactory.getCombinedGenerator() if not generator: - raise add_text.NoEnoughData('You have to specify the generator you want to use for the script!') + raise NoEnoughData('You have to specify the generator you want to use for the script!')
pregenerator = pagegenerators.PreloadingGenerator(generator)
pywikipedia-svn@lists.wikimedia.org