http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10137
Revision: 10137 Author: xqt Date: 2012-04-20 15:37:37 +0000 (Fri, 20 Apr 2012) Log Message: ----------- Print additional informations
Modified Paths: -------------- trunk/pywikipedia/archivebot.py
Modified: trunk/pywikipedia/archivebot.py =================================================================== --- trunk/pywikipedia/archivebot.py 2012-04-20 10:59:32 UTC (rev 10136) +++ trunk/pywikipedia/archivebot.py 2012-04-20 15:37:37 UTC (rev 10137) @@ -543,7 +543,7 @@
if options.calc: if not options.salt: - parser.error('you must specify a salt to calculate a key') + parser.error('Note: you must specify a salt to calculate a key') s = new_hash() s.update(options.salt+'\n') s.update(options.calc+'\n') @@ -563,8 +563,12 @@ if options.lang: Site = pywikibot.getSite(options.lang) language = Site.language() - if pywikibot.debug: print Site
+ if not args: + pywikibot.output(u'NOTE: you must specify a template to run the bot') + pywikibot.showHelp('archivebot') + return + for a in args: pagelist = [] if not options.filename and not options.pagename:
pywikipedia-svn@lists.wikimedia.org