mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-08 00:51:36 +00:00
Use any() in tpu o-o-d checks rather than throwaway lists
The test only needs to consider whether any binaries exist on a given arch, not how many of them there are (or indeed which binaries they are) Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
parent
25cc2c3b36
commit
acec4ff6e3
10
britney.py
10
britney.py
@ -1371,17 +1371,17 @@ class Britney(object):
|
|||||||
|
|
||||||
# if the package in testing has no binaries on this
|
# if the package in testing has no binaries on this
|
||||||
# architecture, it can't be out-of-date
|
# architecture, it can't be out-of-date
|
||||||
if (len([x for x in self.sources["testing"][src][BINARIES]
|
if not any(x for x in self.sources["testing"][src][BINARIES]
|
||||||
if x.endswith("/"+arch) and self.binaries["testing"][arch][0][x.split("/")[0]][ARCHITECTURE] != 'all' ]) == 0):
|
if x.endswith("/"+arch) and self.binaries["testing"][arch][0][x.split("/")[0]][ARCHITECTURE] != 'all'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# if the (t-)p-u package has produced any binaries on
|
# if the (t-)p-u package has produced any binaries on
|
||||||
# this architecture then we assume it's ok. this allows for
|
# this architecture then we assume it's ok. this allows for
|
||||||
# uploads to (t-)p-u which intentionally drop binary
|
# uploads to (t-)p-u which intentionally drop binary
|
||||||
# packages
|
# packages
|
||||||
if (len([x for x in self.binaries[suite][arch][0].values() \
|
if any(x for x in self.binaries[suite][arch][0].values() \
|
||||||
if x[SOURCE] == src and x[SOURCEVER] == source_u[VERSION] and \
|
if x[SOURCE] == src and x[SOURCEVER] == source_u[VERSION] and \
|
||||||
x[ARCHITECTURE] != 'all' ]) > 0):
|
x[ARCHITECTURE] != 'all'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if suite == 'tpu':
|
if suite == 'tpu':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user