diff --git a/dak/admin.py b/dak/admin.py index 248129226d476cd1864afe3c1b9af89ed629ae3f..e1f24aa9c9b802c4eef960be8ca695552b187257 100755 --- a/dak/admin.py +++ b/dak/admin.py @@ -501,8 +501,8 @@ def __suite_architecture_list(d, args): s = d.session() for j in s.query(Suite).order_by(Suite.suite_name): architectures = j.get_architectures(skipsrc=True, skipall=True) - print(j.suite_name + ': ' + - ', '.join([a.arch_string for a in architectures])) + print(j.suite_name + ': ' + + ', '.join([a.arch_string for a in architectures])) def __suite_architecture_listarch(d, args): @@ -612,8 +612,8 @@ def __suite_component_list(d, args): s = d.session() for j in s.query(Suite).order_by(Suite.suite_name): components = j.components - print(j.suite_name + ': ' + - ', '.join([c.component_name for c in components])) + print(j.suite_name + ': ' + + ', '.join([c.component_name for c in components])) def __suite_component_listcomponent(d, args): diff --git a/dak/dak.py b/dak/dak.py index fea67a7ac206e5bda1afc4621970a415b14e667b..45cbdd32975d8ef48044128c02425eb70925f4cc 100755 --- a/dak/dak.py +++ b/dak/dak.py @@ -194,8 +194,8 @@ def main(): if len(sys.argv) == 0: daklib.utils.fubar("err, argc == 0? how is that possible?") elif (len(sys.argv) == 1 - or (len(sys.argv) == 2 and - (sys.argv[1] == "--help" or sys.argv[1] == "-h"))): + or (len(sys.argv) == 2 + and (sys.argv[1] == "--help" or sys.argv[1] == "-h"))): usage(functionality) # First see if we were invoked with/as the name of a module diff --git a/dak/queue_report.py b/dak/queue_report.py index f436f45383264a7ef7237969bb7bcdbbe216641b..925b0dda22d7162c0e991f35ba90de75e1ac0418 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -493,10 +493,10 @@ def process_queue(queue, log, rrd_dir): if '@' in sponsor_login: if fingerprint in logins: sponsor_login = logins[fingerprint] - if (sponsor_name != maintainer["maintainername"] and - sponsor_name != changeby["changedbyname"] and - sponsor_login + '@debian.org' != maintainer["maintaineremail"] and - sponsor_name != changeby["changedbyemail"]): + if (sponsor_name != maintainer["maintainername"] + and sponsor_name != changeby["changedbyname"] + and sponsor_login + '@debian.org' != maintainer["maintaineremail"] + and sponsor_name != changeby["changedbyemail"]): sponsor = sponsor_login for arch in dbc.architecture.split(): diff --git a/dak/show_deferred.py b/dak/show_deferred.py index ac5e8b3205163cae1faa3f2ecf1c52220e643f58..abc13d8537bf44d86c2c99efa27f1f614b816fc0 100755 --- a/dak/show_deferred.py +++ b/dak/show_deferred.py @@ -316,8 +316,8 @@ def main(): for r, d, f in os.walk(Cnf["Show-Deferred::LinkPath"]): for af in f: afp = os.path.join(r, af) - if (not os.path.exists(afp) or - (af.endswith('.changes') and af not in available_changes)): + if (not os.path.exists(afp) + or (af.endswith('.changes') and af not in available_changes)): os.unlink(afp) if __name__ == '__main__': diff --git a/dak/stats.py b/dak/stats.py index bf4ec86025c341039ddb981ae5834d2ffd73b1bd..f150cbe76cb7c726ab11ba459101650b57ccaeae 100755 --- a/dak/stats.py +++ b/dak/stats.py @@ -313,8 +313,8 @@ def parse_prod(logdate): (fd, tmpfile) = utils.temp_filename(utils.get_conf()['Dir::TempPath']) system('xzcat %s > %s' % (mailarchive, tmpfile)) for message in mbox(tmpfile): - if (message['subject'] and - message['subject'].startswith('Comments regarding')): + if (message['subject'] + and message['subject'].startswith('Comments regarding')): try: member = users[' '.join(message['From'].split()[:-1])] except KeyError: diff --git a/daklib/changes.py b/daklib/changes.py index aa505a970731c3b4d39beda6fb805e6ab359f37f..4fd17dc9087297c300c6253f53c81dd1f1ed8c3b 100644 --- a/daklib/changes.py +++ b/daklib/changes.py @@ -301,20 +301,20 @@ class Changes(object): return chg def unknown_files_fields(self, name): - return sorted(list(set(self.files[name].keys()) - - set(CHANGESFIELDS_FILES))) + return sorted(list(set(self.files[name].keys()) + - set(CHANGESFIELDS_FILES))) def unknown_changes_fields(self): - return sorted(list(set(self.changes.keys()) - - set(CHANGESFIELDS_MANDATORY + CHANGESFIELDS_OPTIONAL))) + return sorted(list(set(self.changes.keys()) + - set(CHANGESFIELDS_MANDATORY + CHANGESFIELDS_OPTIONAL))) def unknown_dsc_fields(self): - return sorted(list(set(self.dsc.keys()) - - set(CHANGESFIELDS_DSC))) + return sorted(list(set(self.dsc.keys()) + - set(CHANGESFIELDS_DSC))) def unknown_dsc_files_fields(self, name): - return sorted(list(set(self.dsc_files[name].keys()) - - set(CHANGESFIELDS_DSCFILES_MANDATORY + CHANGESFIELDS_DSCFILES_OPTIONAL))) + return sorted(list(set(self.dsc_files[name].keys()) + - set(CHANGESFIELDS_DSCFILES_MANDATORY + CHANGESFIELDS_DSCFILES_OPTIONAL))) def str_files(self): r = [] diff --git a/daklib/queue.py b/daklib/queue.py index b2b80354e759896daa7e1a9e71c0d781771e1d24..7b47af64c178562f9beac43e0a6ede03175ebcb4 100644 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -295,8 +295,8 @@ class Upload(object): if debian_emails: uid_email = debian_emails[0] if ("source" in self.pkg.changes["architecture"] and uid_email and utils.is_email_alias(uid_email)): - if (self.pkg.changes["maintaineremail"] not in sponsor_addresses and - self.pkg.changes["changedbyemail"] not in sponsor_addresses): + if (self.pkg.changes["maintaineremail"] not in sponsor_addresses + and self.pkg.changes["changedbyemail"] not in sponsor_addresses): self.pkg.changes["sponsoremail"] = uid_email return sponsored diff --git a/daklib/utils.py b/daklib/utils.py index c5b323c6183cf4c18ed5be0350314e12fcfabe93..2fd784807ed85ec0a0c726a28c83d7307835db59 100644 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -846,8 +846,8 @@ def gpg_get_key_addresses(fingerprint): try: with open(os.devnull, "wb") as devnull: output = daklib.daksubprocess.check_output( - ["gpg", "--no-default-keyring"] + gpg_keyring_args().split() + - ["--with-colons", "--list-keys", fingerprint], stderr=devnull) + ["gpg", "--no-default-keyring"] + gpg_keyring_args().split() + + ["--with-colons", "--list-keys", fingerprint], stderr=devnull) except subprocess.CalledProcessError: pass else: diff --git a/tools/logs.py b/tools/logs.py index 38fe7c83ece06be2aff77ea36f6306a51412d3f4..3087e01b5d8d5fd01389446d7a5fe8e9d9bb5a3c 100755 --- a/tools/logs.py +++ b/tools/logs.py @@ -15,7 +15,7 @@ ITEMS_TO_KEEP = 20 CACHE_FILE = '/srv/ftp-master.debian.org/misc/dinstall_time_cache' GRAPH_DIR = '/srv/ftp.debian.org/web/stat' -LINE = re.compile(r'(?:|.*/)dinstall_(\d{4})\.(\d{2})\.(\d{2})-(\d{2}):(\d{2}):(\d{2})\.log(?:\.bz2)?:' + +LINE = re.compile(r'(?:|.*/)dinstall_(\d{4})\.(\d{2})\.(\d{2})-(\d{2}):(\d{2}):(\d{2})\.log(?:\.bz2)?:' r'Archive maintenance timestamp \(([^\)]*)\): (\d{2}):(\d{2}):(\d{2})$') UNSAFE = re.compile(r'[^a-zA-Z/\._:0-9\- ]')