Only perform the copy if the original namespace is present.

This commit is contained in:
Ralph Bean 2016-12-01 17:24:56 +00:00
parent c43083ba4f
commit e9109af2f6
3 changed files with 12 additions and 6 deletions

View file

@ -77,10 +77,12 @@ if __name__ == '__main__':
# https://github.com/fedora-infra/pkgdb2/issues/329#issuecomment-207050233
# And then, this got renamed from rpms-checks to test-rpms
# https://pagure.io/fedora-infrastructure/issue/5570
data['test-rpms'] = copy.copy(data['rpms'])
if 'rpms' in data:
data['test-rpms'] = copy.copy(data['rpms'])
# Also, modules are a thing
# https://pagure.io/fedora-infrastructure/issue/5571
data['test-modules'] = copy.copy(data['modules'])
if 'modules' in data:
data['test-modules'] = copy.copy(data['modules'])
# Get a list of all the packages
for key in data:

View file

@ -293,10 +293,12 @@ if __name__ == '__main__':
# https://github.com/fedora-infra/pkgdb2/issues/329#issuecomment-207050233
# And then, this got renamed from rpms-checks to test-rpms
# https://pagure.io/fedora-infrastructure/issue/5570
data['test-rpms'] = copy.copy(data['rpms'])
if 'rpms' in data:
data['test-rpms'] = copy.copy(data['rpms'])
# Also, modules are a thing
# https://pagure.io/fedora-infrastructure/issue/5571
data['test-modules'] = copy.copy(data['modules'])
if 'modules' in data:
data['test-modules'] = copy.copy(data['modules'])
# Get a list of all the packages
for key in data:

View file

@ -256,10 +256,12 @@ def main():
# https://github.com/fedora-infra/pkgdb2/issues/329#issuecomment-207050233
# And then, this got renamed from rpms-checks to test-rpms
# https://pagure.io/fedora-infrastructure/issue/5570
pkgdb_info['test-rpms'] = copy.copy(pkgdb_info['rpms'])
if 'rpms' in pkgdb_info:
pkgdb_info['test-rpms'] = copy.copy(pkgdb_info['rpms'])
# Also, modules are a thing
# https://pagure.io/fedora-infrastructure/issue/5571
pkgdb_info['test-modules'] = copy.copy(pkgdb_info['modules'])
if 'modules' in pkgdb_info:
pkgdb_info['test-modules'] = copy.copy(pkgdb_info['modules'])
for ns in pkgdb_info:
namespace = ns