Skip to content

Commit

Permalink
more error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
James Michael DuPont authored and James Michael DuPont committed Oct 29, 2012
1 parent 677ebd5 commit f911bad
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions speedydeletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ def main(*args):
try :
outpage = pywikibot.Page(site=outsite, title=entry.title, insite=outsite)


if outpage.exists():
exists =False
try:
exists = outpage.exists()
except :
pywikibot.output(u'key error exiting article %s transformed to %s' % (entry.title , title) )

if exists :
#pywikibot.output(u'there is an article %s' % entry.title)
try:
file_store[title] = 1
Expand All @@ -114,7 +119,10 @@ def main(*args):
else:
contents = contents + "\n{{wikipedia-deleted|%s}}" % usernames
outpage._site=outsite
outpage.put(contents)
try :
outpage.put(contents)
except :
pywikibot.output(u'cannot put article %s / %s' % (entry.title , title) )
try :
file_store[title] = 1
except KeyboardInterrupt:
Expand Down

0 comments on commit f911bad

Please sign in to comment.