Revision: 7050 Author: russblau Date: 2009-07-13 13:30:13 +0000 (Mon, 13 Jul 2009)
Log Message: ----------- replace deprecated arg; use latest pickle protocol
Modified Paths: -------------- branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/scripts/category_redirect.py =================================================================== --- branches/rewrite/scripts/category_redirect.py 2009-07-13 10:07:10 UTC (rev 7049) +++ branches/rewrite/scripts/category_redirect.py 2009-07-13 13:30:13 UTC (rev 7050) @@ -334,7 +334,7 @@ sorted(log_items.iteritems(), reverse=True)[:LOG_SIZE-1]] log_text = "\n".join("\n".join(line for line in text) for text in keep) # get permalink to older logs - history = self.log_page.getVersionHistory(revCount=LOG_SIZE) + history = self.log_page.getVersionHistory(total=LOG_SIZE) # get the id of the newest log being archived rotate_revid = history[-1][0] # append permalink @@ -372,7 +372,7 @@ except IOError: record = {} if record: - cPickle.dump(record, open(datafile + ".bak", "wb")) + cPickle.dump(record, open(datafile + ".bak", "wb"), -1)
try: template_list = self.redir_templates[self.site.family.name @@ -590,7 +590,7 @@ % (self.catprefix, cat_title, found, moved)) counts[cat_title] = found
- cPickle.dump(record, open(datafile, "wb")) + cPickle.dump(record, open(datafile, "wb"), -1)
pywikibot.setAction(pywikibot.translate(self.site.lang, self.maint_comment))
pywikipedia-svn@lists.wikimedia.org