Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixes #497 - local variable 'item' referenced before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
matt8754 authored and goosemania committed Jan 12, 2022
1 parent 18b974a commit 72a6325
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES/497.bugfix
@@ -0,0 +1 @@
Fixed local variable 'item' referenced before assignment
21 changes: 10 additions & 11 deletions pulp_2to3_migration/app/plugin/docker/migrator.py
Expand Up @@ -233,18 +233,17 @@ def relate_manifest_to_list(self, dc):
digest = manifest['digest']
for item in man_list:
if item.digest == digest:
platform = manifest['platform']
thru = ManifestListManifest(manifest_list=item, image_manifest=dc.content,
architecture=platform['architecture'],
os=platform['os'],
features=platform.get('features', ''),
variant=platform.get('variant', ''),
os_version=platform.get('os.version', ''),
os_features=platform.get('os.features', '')
)
mlm.append(thru)
break
platform = manifest['platform']
thru = ManifestListManifest(manifest_list=item, image_manifest=dc.content,
architecture=platform['architecture'],
os=platform['os'],
features=platform.get('features', ''),
variant=platform.get('variant', ''),
os_version=platform.get('os.version', ''),
os_features=platform.get('os.features', '')
)
mlm.append(thru)

return mlm


Expand Down

0 comments on commit 72a6325

Please sign in to comment.