Revision: 4168 Author: a_engels Date: 2007-09-01 07:01:02 +0000 (Sat, 01 Sep 2007)
Log Message: ----------- Don't crash when trying to work on a non-existing page
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2007-09-01 02:34:14 UTC (rev 4167) +++ trunk/pywikipedia/interwiki.py 2007-09-01 07:01:02 UTC (rev 4168) @@ -953,6 +953,11 @@ # This is not a page, but a subpage. Do not edit it. wikipedia.output(u"Not editing %s: not doing interwiki on subpages" % page.aslink(True)) raise SaveError + + if not page.exists(): + wikipedia.output(u"Not editing %s: page does not exist" % page.aslink(True)) + raise SaveError + # Show a message in purple. wikipedia.output("\03{lightpurple}Updating links on page %s.\03{default}" % page.aslink(True))
pywikipedia-l@lists.wikimedia.org