http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9784
Revision: 9784
Author: xqt
Date: 2011-12-05 07:48:04 +0000 (Mon, 05 Dec 2011)
Log Message:
-----------
fix for r9694 (bug #3449372)
Modified Paths:
--------------
trunk/pywikipedia/basic.py
Modified: trunk/pywikipedia/basic.py
===================================================================
--- trunk/pywikipedia/basic.py 2011-12-03 11:47:22 UTC (rev 9783)
+++ trunk/pywikipedia/basic.py 2011-12-05 07:48:04 UTC (rev 9784)
@@ -93,7 +93,7 @@
return text
return None
- def save(self, text, page, comment=self.summary, minorEdit=True,
+ def save(self, text, page, comment=None, minorEdit=True,
botflag=True):
# only save if something was changed
if text != page.get():
@@ -111,8 +111,8 @@
if choice == 'y':
try:
# Save the page
- page.put(text, comment=comment, minorEdit=minorEdit,
- botflag=botflag)
+ page.put(text, comment=comment or self.comment,
+ minorEdit=minorEdit, botflag=botflag)
except pywikibot.LockedPage:
pywikibot.output(u"Page %s is locked; skipping."
% page.title(asLink=True))