Revision: 8515 Author: amir Date: 2010-09-10 21:06:00 +0000 (Fri, 10 Sep 2010)
Log Message: ----------- -always has not being worked.I corrected it
Modified Paths: -------------- trunk/pywikipedia/unusedfiles.py
Modified: trunk/pywikipedia/unusedfiles.py =================================================================== --- trunk/pywikipedia/unusedfiles.py 2010-09-10 20:42:05 UTC (rev 8514) +++ trunk/pywikipedia/unusedfiles.py 2010-09-10 21:06:00 UTC (rev 8515) @@ -58,6 +58,7 @@ #**********************#
def appendtext(page, apptext, always): + msg = wikipedia.translate(wikipedia.getSite(), comment) try: text = page.get() except wikipedia.IsRedirectPage: @@ -67,12 +68,14 @@ text += apptext; if text != page.get(): wikipedia.showDiff(page.get(),text) - choice = wikipedia.inputChoice(u'Do you want to accept these changes?', ['Yes', 'No', 'All'], ['y', 'N', 'a'], 'N') - if choice == 'a': - always = True - choice = 'y' - if choice == 'y': - msg = wikipedia.translate(wikipedia.getSite(), comment) + if not always==True: + choice = wikipedia.inputChoice(u'Do you want to accept these changes?', ['Yes', 'No', 'All'], ['y', 'N', 'a'], 'N') + if choice == 'a': + always = True + choice = 'y' + if choice == 'y': + page.put(text, msg) + else: page.put(text, msg)
def main():