Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/280172
Change subject: Fix a few flake8 errors ...................................................................... Fix a few flake8 errors ./WikiDump.py:130:4: E123 closing bracket does not match indentation of opening bracket's line ./WikiDump.py:204:27: F812 list comprehension redefines 'age' from line 197 ./worker.py:7:1: F401 're' imported but unused ./worker.py:385:12: F821 undefined name 'readFile' ./worker.py:519:3: F841 local variable 'output' is assigned to but never used ./worker.py:900:11: E703 statement ends with a semicolon ./worker.py:924:5: E126 continuation line over-indented for hanging indent Change-Id: Icde7abbd679af60f9c1778c5e86ce58a900bfdb6 --- M WikiDump.py M worker.py 2 files changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/72/280172/1 diff --git a/WikiDump.py b/WikiDump.py index ec03431..fc4598f 100644 --- a/WikiDump.py +++ b/WikiDump.py @@ -127,7 +127,7 @@ "mysql": "mysql", #"cleanup": { "keep": "3", - } + } conf = ConfigParser.SafeConfigParser(defaults) conf.read(files) @@ -201,7 +201,7 @@ dumpFailed = (status == '') or ('dump aborted' in status) available.append((dumpFailed, age, db)) available.sort() - return [db for (failed, age, db) in available] + return [db for (failed, avail_age, db) in available] def readTemplate(self, name): template = os.path.join(self.templateDir, name) diff --git a/worker.py b/worker.py index da68de9..9c90725 100644 --- a/worker.py +++ b/worker.py @@ -4,7 +4,6 @@ import md5 import os import popen2 -import re import sys import time import WikiDump @@ -382,7 +381,7 @@ if dir: status = join(self.publicBase(db), db, dir, "status.html") try: - return readFile(status) + return WikiDump.readFile(status) except: return "<li>%s missing status record</li>" % db else: @@ -516,7 +515,7 @@ def prepareChecksums(self): """Create the md5 checksum file at the start of the run. This will overwrite a previous run's output, if any.""" - output = file(self.publicPath("md5sums.txt"), "w") + file(self.publicPath("md5sums.txt"), "w") def checksum(self, filename): """Run checksum for an output file, and append to the list.""" @@ -897,7 +896,7 @@ xmlbz2, runner.config.sevenzip, xml7z, - xml7z)); + xml7z)) return runner.runCommand(command, callback=self.progressCallback) @@ -921,12 +920,12 @@ %s \ --server=%s \ """ % shellEscape(( - runner.config.php, - runner.config.wikiDir, - runner.dbName, - runner.config.wikiDir, - runner.forceNormalOption(), - runner.dbServer)) + runner.config.php, + runner.config.wikiDir, + runner.dbName, + runner.config.wikiDir, + runner.forceNormalOption(), + runner.dbServer)) for variant in self._variants(runner): command = command + """ --output=file:%s \ --filter=namespace:NS_MAIN \ -- To view, visit https://gerrit.wikimedia.org/r/280172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icde7abbd679af60f9c1778c5e86ce58a900bfdb6 Gerrit-PatchSet: 1 Gerrit-Project: operations/dumps Gerrit-Branch: master Gerrit-Owner: Hashar <has...@free.fr> Gerrit-Reviewer: ArielGlenn <ar...@wikimedia.org> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits