Revision: 4341 Author: cosoleto Date: 2007-09-21 14:41:35 +0000 (Fri, 21 Sep 2007)
Log Message: ----------- minor fix, code cleanup
Modified Paths: -------------- trunk/pywikipedia/copyright_clean.py trunk/pywikipedia/family.py trunk/pywikipedia/replace.py trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/copyright_clean.py =================================================================== --- trunk/pywikipedia/copyright_clean.py 2007-09-21 13:40:33 UTC (rev 4340) +++ trunk/pywikipedia/copyright_clean.py 2007-09-21 14:41:35 UTC (rev 4341) @@ -154,9 +154,9 @@
if comment_entry: wikipedia.output(add_comment) + if wikipedia.verbose: + wikipedia.showDiff(page.get(), output)
- wikipedia.showDiff(output, page.get()) - if len(sys.argv)!=1: choice = wikipedia.inputChoice(u'Do you want to clean the page?', ['Yes', 'No'], ['y', 'n'], 'n') if choice in ['n', 'N']:
Modified: trunk/pywikipedia/family.py =================================================================== --- trunk/pywikipedia/family.py 2007-09-21 13:40:33 UTC (rev 4340) +++ trunk/pywikipedia/family.py 2007-09-21 14:41:35 UTC (rev 4341) @@ -2575,6 +2575,7 @@
def query_address(self, code): return '%s?' % self.querypath(code) + def api_address(self, code): return '%s?' % self.apipath(code)
Modified: trunk/pywikipedia/replace.py =================================================================== --- trunk/pywikipedia/replace.py 2007-09-21 13:40:33 UTC (rev 4340) +++ trunk/pywikipedia/replace.py 2007-09-21 14:41:35 UTC (rev 4341) @@ -405,7 +405,7 @@ useSql = True elif arg.startswith('-page'): if len(arg) == 5: - PageTitles.append(wikipedia.input(u'Which page do you want to chage?')) + PageTitles.append(wikipedia.input(u'Which page do you want to change?')) else: PageTitles.append(arg[6:]) elif arg.startswith('-excepttitle:'):
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-09-21 13:40:33 UTC (rev 4340) +++ trunk/pywikipedia/wikipedia.py 2007-09-21 14:41:35 UTC (rev 4341) @@ -2161,6 +2161,8 @@ return self.fileUrl().startswith(u'http://wikitravel.org/upload/shared/') return self.fileIsOnCommons()
+ # FIXME: MD5 might be performed on not complete file due to server disconnection + # (see bug #1795683). def getFileMd5Sum(self): uo = MyURLopener() f = uo.open(self.fileUrl())