mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-13 15:37:02 +00:00
Replaced "x.has_key(y)" with "y in x"
"has_key" is no longer supported for dict in python3. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
46ae57bad4
commit
582eabcb78
10
britney.py
10
britney.py
@ -805,7 +805,7 @@ class Britney:
|
||||
for hint in hints[x]:
|
||||
package = hint.package
|
||||
key = (hint, hint.user)
|
||||
if z.has_key(package) and z[package] != key:
|
||||
if package in z and z[package] != key:
|
||||
hint2 = z[package][0]
|
||||
if x in ['unblock', 'unblock-udeb']:
|
||||
if apt_pkg.VersionCompare(hint2.version, hint.version) < 0:
|
||||
@ -1409,15 +1409,15 @@ class Britney:
|
||||
for pkg in pkgs.keys():
|
||||
bugs_t = []
|
||||
bugs_u = []
|
||||
if self.bugs['testing'].has_key(pkg):
|
||||
if pkg in self.bugs['testing']:
|
||||
bugs_t.extend(self.bugs['testing'][pkg])
|
||||
if self.bugs['unstable'].has_key(pkg):
|
||||
if pkg in self.bugs['unstable']:
|
||||
bugs_u.extend(self.bugs['unstable'][pkg])
|
||||
if 'source' in pkgs[pkg]:
|
||||
spkg = "src:%s" % (pkg)
|
||||
if self.bugs['testing'].has_key(spkg):
|
||||
if spkg in self.bugs['testing']:
|
||||
bugs_t.extend(self.bugs['testing'][spkg])
|
||||
if self.bugs['unstable'].has_key(spkg):
|
||||
if spkg in self.bugs['unstable']:
|
||||
bugs_u.extend(self.bugs['unstable'][spkg])
|
||||
|
||||
new_bugs = sorted(set(bugs_u).difference(bugs_t))
|
||||
|
Loading…
x
Reference in New Issue
Block a user