Fix pycodestyle warnings

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 328695ee63
commit b0835fa4a1
No known key found for this signature in database
GPG Key ID: A65B78DBE67C7AAC

@ -200,9 +200,10 @@ from britney2.inputs.suiteloader import DebMirrorLikeSuiteContentLoader, Missing
from britney2.installability.builder import build_installability_tester from britney2.installability.builder import build_installability_tester
from britney2.installability.solver import InstallabilitySolver from britney2.installability.solver import InstallabilitySolver
from britney2.migration import MigrationManager from britney2.migration import MigrationManager
from britney2.migrationitem import MigrationItem, MigrationItemFactory from britney2.migrationitem import MigrationItemFactory
from britney2.policies import PolicyVerdict from britney2.policies import PolicyVerdict
from britney2.policies.policy import AgePolicy, RCBugPolicy, PiupartsPolicy, BuildDependsPolicy, PolicyEngine, BlockPolicy, BuiltUsingPolicy from britney2.policies.policy import (AgePolicy, RCBugPolicy, PiupartsPolicy, BuildDependsPolicy, PolicyEngine,
BlockPolicy, BuiltUsingPolicy)
from britney2.policies.autopkgtest import AutopkgtestPolicy from britney2.policies.autopkgtest import AutopkgtestPolicy
from britney2.utils import (log_and_format_old_libraries, get_dependency_solvers, from britney2.utils import (log_and_format_old_libraries, get_dependency_solvers,
read_nuninst, write_nuninst, write_heidi, read_nuninst, write_nuninst, write_heidi,

@ -968,8 +968,8 @@ class BuiltUsingPolicy(BasePolicy):
super().initialise(britney) super().initialise(britney)
self._britney = britney self._britney = britney
def apply_srcarch_policy_impl(self, build_deps_info, suite, source_name, arch, source_data_tdist, source_data_srcdist, excuse, def apply_srcarch_policy_impl(self, build_deps_info, suite, source_name, arch, source_data_tdist,
get_dependency_solvers=get_dependency_solvers): source_data_srcdist, excuse, get_dependency_solvers=get_dependency_solvers):
verdict = PolicyVerdict.PASS verdict = PolicyVerdict.PASS
britney = self._britney britney = self._britney
@ -984,7 +984,7 @@ class BuiltUsingPolicy(BasePolicy):
def check_bu_in_suite(bu_source, bu_version, source_suite): def check_bu_in_suite(bu_source, bu_version, source_suite):
found = False found = False
if not bu_source in source_suite.sources: if bu_source not in source_suite.sources:
return found return found
s_source = source_suite.sources[bu_source] s_source = source_suite.sources[bu_source]
s_ver = s_source.version s_ver = s_source.version
@ -992,14 +992,13 @@ class BuiltUsingPolicy(BasePolicy):
found = True found = True
item_name = compute_item_name(sources_t, source_suite.sources, bu_source, arch) item_name = compute_item_name(sources_t, source_suite.sources, bu_source, arch)
if arch in self.options.break_arches: if arch in self.options.break_arches:
excuse.addhtml("Ignoring Built-Using for %s/%s on %s" % (pkg_name,arch,item_name)) excuse.addhtml("Ignoring Built-Using for %s/%s on %s" % (pkg_name, arch, item_name))
else: else:
excuse.add_dependency(DependencyType.BUILT_USING, item_name, arch) excuse.add_dependency(DependencyType.BUILT_USING, item_name, arch)
excuse.addhtml("%s/%s has Built-Using on %s" % (pkg_name,arch,item_name)) excuse.addhtml("%s/%s has Built-Using on %s" % (pkg_name, arch, item_name))
return found return found
for pkg_id in sorted(x for x in source_data_srcdist.binaries if x.architecture == arch): for pkg_id in sorted(x for x in source_data_srcdist.binaries if x.architecture == arch):
pkg_name = pkg_id.package_name pkg_name = pkg_id.package_name
@ -1025,9 +1024,11 @@ class BuiltUsingPolicy(BasePolicy):
if not found: if not found:
if arch in self.options.break_arches: if arch in self.options.break_arches:
excuse.addhtml("Ignoring unsatisfiable Built-Using for %s/%s on %s %s" % (pkg_name,arch, bu_source, bu_version)) excuse.addhtml("Ignoring unsatisfiable Built-Using for %s/%s on %s %s" % (
pkg_name, arch, bu_source, bu_version))
else: else:
excuse.addhtml("%s/%s has unsatisfiable Built-Using on %s %s" % (pkg_name,arch, bu_source, bu_version)) excuse.addhtml("%s/%s has unsatisfiable Built-Using on %s %s" % (
pkg_name, arch, bu_source, bu_version))
if verdict.value < PolicyVerdict.REJECTED_PERMANENTLY.value: if verdict.value < PolicyVerdict.REJECTED_PERMANENTLY.value:
verdict = PolicyVerdict.REJECTED_PERMANENTLY verdict = PolicyVerdict.REJECTED_PERMANENTLY

Loading…
Cancel
Save