未验证 提交 2155aa61 编写于 作者: 😸 😸

fix errors reported by flake8

上级 ddd51adb
...@@ -219,8 +219,8 @@ def check_override(): ...@@ -219,8 +219,8 @@ def check_override():
q = session.execute(""" q = session.execute("""
SELECT DISTINCT b.package FROM binaries b, bin_associations ba SELECT DISTINCT b.package FROM binaries b, bin_associations ba
WHERE b.id = ba.bin AND ba.suite = :suiteid AND NOT EXISTS WHERE b.id = ba.bin AND ba.suite = :suiteid AND NOT EXISTS
(SELECT 1 FROM override o WHERE o.suite = :suiteid AND o.package = b.package)""" (SELECT 1 FROM override o WHERE o.suite = :suiteid AND o.package = b.package)""",
% {'suiteid': suite.suite_id}) {'suiteid': suite.suite_id})
for j in q.fetchall(): for j in q.fetchall():
print(j[0]) print(j[0])
...@@ -228,8 +228,8 @@ SELECT DISTINCT b.package FROM binaries b, bin_associations ba ...@@ -228,8 +228,8 @@ SELECT DISTINCT b.package FROM binaries b, bin_associations ba
q = session.execute(""" q = session.execute("""
SELECT DISTINCT s.source FROM source s, src_associations sa SELECT DISTINCT s.source FROM source s, src_associations sa
WHERE s.id = sa.source AND sa.suite = :suiteid AND NOT EXISTS WHERE s.id = sa.source AND sa.suite = :suiteid AND NOT EXISTS
(SELECT 1 FROM override o WHERE o.suite = :suiteid and o.package = s.source)""" (SELECT 1 FROM override o WHERE o.suite = :suiteid and o.package = s.source)""",
% {'suiteid': suite.suite_id}) {'suiteid': suite.suite_id})
for j in q.fetchall(): for j in q.fetchall():
print(j[0]) print(j[0])
......
...@@ -177,7 +177,7 @@ def comment_accept(upload, srcqueue, comments, transaction): ...@@ -177,7 +177,7 @@ def comment_accept(upload, srcqueue, comments, transaction):
source_component = source_component_func(upload.source) source_component = source_component_func(upload.source)
if upload.target_suite.suite_name in cnf.value_list('Dinstall::ThrowAwayNewBinarySuites') and \ if upload.target_suite.suite_name in cnf.value_list('Dinstall::ThrowAwayNewBinarySuites') and \
source_component.component_name in cnf.value_list('Dinstall::ThrowAwayNewBinaryComponents'): source_component.component_name in cnf.value_list('Dinstall::ThrowAwayNewBinaryComponents'):
throw_away_binaries = True throw_away_binaries = True
for suite in all_target_suites: for suite in all_target_suites:
debug_suite = suite.debug_suite debug_suite = suite.debug_suite
......
...@@ -476,7 +476,7 @@ class BinaryCheck(Check): ...@@ -476,7 +476,7 @@ class BinaryCheck(Check):
raise Reject('{0}: APT could not parse {1} field'.format(fn, field)) raise Reject('{0}: APT could not parse {1} field'.format(fn, field))
for group in depends: for group in depends:
if not allow_alternatives and len(group) != 1: if not allow_alternatives and len(group) != 1:
raise Reject('{0}: {1}: alternatives are not allowed'.format(fn)) raise Reject('{0}: {1}: alternatives are not allowed'.format(fn, field))
for dep_pkg, dep_ver, dep_rel in group: for dep_pkg, dep_ver, dep_rel in group:
if dep_rel not in allow_relations: if dep_rel not in allow_relations:
raise Reject('{}: {}: depends on {}, but only relations {} are allowed for this field'.format(fn, field, " ".join(dep_pkg, dep_rel, dep_ver), allow_relations)) raise Reject('{}: {}: depends on {}, but only relations {} are allowed for this field'.format(fn, field, " ".join(dep_pkg, dep_rel, dep_ver), allow_relations))
...@@ -557,7 +557,7 @@ class SourceCheck(Check): ...@@ -557,7 +557,7 @@ class SourceCheck(Check):
if is_orig: if is_orig:
upstream_match = re_field_version_upstream.match(version) upstream_match = re_field_version_upstream.match(version)
if not upstream_match: if not upstream_match:
raise Reject('{0}: Source package includes upstream tarball, but {0} has no Debian revision.'.format(filename, version)) raise Reject('{0}: Source package includes upstream tarball, but {1} has no Debian revision.'.format(filename, version))
version = upstream_match.group('upstream') version = upstream_match.group('upstream')
version_match = re_field_version.match(version) version_match = re_field_version.match(version)
version_without_epoch = version_match.group('without_epoch') version_without_epoch = version_match.group('without_epoch')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册