http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11496
Revision: 11496 Author: drtrigon Date: 2013-05-04 22:33:48 +0000 (Sat, 04 May 2013) Log Message: ----------- bug fix; change general exception to more precise AttributeError (fulfill PEP20 ;)
Modified Paths: -------------- branches/rewrite/pywikibot/bot.py
Modified: branches/rewrite/pywikibot/bot.py =================================================================== --- branches/rewrite/pywikibot/bot.py 2013-05-04 22:23:56 UTC (rev 11495) +++ branches/rewrite/pywikibot/bot.py 2013-05-04 22:33:48 UTC (rev 11496) @@ -239,7 +239,7 @@ # if site not available it's too early to print a header (work-a-round) try: site = pywikibot.getSite() - except: + except AttributeError: return
output(u'=== Pywikipediabot framework v2.0 -- Logging header ===')