diff options
| author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2015-11-20 17:29:32 +0100 |
|---|---|---|
| committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2015-11-20 17:29:32 +0100 |
| commit | c8d7b8485bc27244d0dbc4c021f3f5ce228bf7f1 (patch) | |
| tree | c78c9fc6f6c4cbb02489473aedc68ddb0dfa9338 /roles/distgit | |
| parent | d35500929e468470cff3523b5af3f4e2b15fca7b (diff) | |
Store the key in a variable
Diffstat (limited to 'roles/distgit')
| -rw-r--r-- | roles/distgit/templates/pkgdb_sync_git_branches.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index 9055e48a1..70bab3c92 100644 --- a/roles/distgit/templates/pkgdb_sync_git_branches.py +++ b/roles/distgit/templates/pkgdb_sync_git_branches.py @@ -150,14 +150,15 @@ def pkgdb_pkg_branch(): data = req.json() output = {} - for pkg in data['packageAcls']: + key = 'packageAcls' + for pkg in data[key]: if pkg in output: if VERBOSE: print 'Strange package: %s, it is present twice in the ' \ 'pkgdb output' % pkg - output[pkg].updated(data['packageAcls'][pkg].keys()) + output[pkg].updated(data[key][pkg].keys()) else: - output[pkg] = set(data['packageAcls'][pkg].keys()) + output[pkg] = set(data[key][pkg].keys()) return output |
