[Pywikipedia-l] SVN: [4781] trunk/pywikipedia/add_text.py
filnik at svn.wikimedia.org
filnik at svn.wikimedia.org
Sat Dec 29 21:38:37 UTC 2007
Revision: 4781
Author: filnik
Date: 2007-12-29 21:38:37 +0000 (Sat, 29 Dec 2007)
Log Message:
-----------
Forgot to delete useless spaces.
Modified Paths:
--------------
trunk/pywikipedia/add_text.py
Modified: trunk/pywikipedia/add_text.py
===================================================================
--- trunk/pywikipedia/add_text.py 2007-12-29 21:35:32 UTC (rev 4780)
+++ trunk/pywikipedia/add_text.py 2007-12-29 21:38:37 UTC (rev 4781)
@@ -222,15 +222,13 @@
if choice.lower() in ['a', 'all']:
always = True
if choice.lower() in ['n', 'no']:
- return False
-
+ return False
if choice.lower() in ['y', 'yes'] or always:
try:
page.put(newtext, summary)
except wikipedia.EditConflict:
wikipedia.output(u'Edit conflict! skip!')
- return False
-
+ return False
except wikipedia.ServerError:
errorCount += 1
if errorCount < 5:
@@ -241,21 +239,17 @@
raise wikipedia.ServerError(u'Fifth Server Error!')
except wikipedia.SpamfilterError, e:
wikipedia.output(u'Cannot change %s because of blacklist entry %s' % (page.title(), e.url))
- return False
-
+ return False
except wikipedia.PageNotSaved, error:
wikipedia.output(u'Error putting page: %s' % error.args)
- return False
-
+ return False
except wikipedia.LockedPage:
wikipedia.output(u'Skipping %s (locked page)' % page.title())
- return False
-
+ return False
else:
# Break only if the errors are one after the other...
errorCount = 0
- return True
-
+ return True
else:
return (text, newtext)
More information about the Pywikipedia-l
mailing list