Store the key in a variable
This commit is contained in:
parent
d35500929e
commit
c8d7b8485b
1 changed files with 4 additions and 3 deletions
|
@ -150,14 +150,15 @@ def pkgdb_pkg_branch():
|
||||||
data = req.json()
|
data = req.json()
|
||||||
|
|
||||||
output = {}
|
output = {}
|
||||||
for pkg in data['packageAcls']:
|
key = 'packageAcls'
|
||||||
|
for pkg in data[key]:
|
||||||
if pkg in output:
|
if pkg in output:
|
||||||
if VERBOSE:
|
if VERBOSE:
|
||||||
print 'Strange package: %s, it is present twice in the ' \
|
print 'Strange package: %s, it is present twice in the ' \
|
||||||
'pkgdb output' % pkg
|
'pkgdb output' % pkg
|
||||||
output[pkg].updated(data['packageAcls'][pkg].keys())
|
output[pkg].updated(data[key][pkg].keys())
|
||||||
else:
|
else:
|
||||||
output[pkg] = set(data['packageAcls'][pkg].keys())
|
output[pkg] = set(data[key][pkg].keys())
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue