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,9 +77,11 @@ 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
if 'rpms' in data:
data['test-rpms'] = copy.copy(data['rpms'])
# Also, modules are a thing
# https://pagure.io/fedora-infrastructure/issue/5571
if 'modules' in data:
data['test-modules'] = copy.copy(data['modules'])
# Get a list of all the packages

View file

@ -293,9 +293,11 @@ 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
if 'rpms' in data:
data['test-rpms'] = copy.copy(data['rpms'])
# Also, modules are a thing
# https://pagure.io/fedora-infrastructure/issue/5571
if 'modules' in data:
data['test-modules'] = copy.copy(data['modules'])
# Get a list of all the packages

View file

@ -256,9 +256,11 @@ 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
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
if 'modules' in pkgdb_info:
pkgdb_info['test-modules'] = copy.copy(pkgdb_info['modules'])
for ns in pkgdb_info: