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

Commit

Permalink
Fix Package migration when its remote is not migrated.
Browse files Browse the repository at this point in the history
  • Loading branch information
goosemania committed Jul 3, 2020
1 parent 16d7d87 commit 48a80ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES/7078.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed RPM migration when its remote is not migrated.
13 changes: 7 additions & 6 deletions pulp_2to3_migration/app/plugin/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def get_remote_by_importer_id(importer_id):
has_future = content_type in migrator.future_types
is_multi_artifact = content_type in migrator.multi_artifact_types
for pulp_2to3_detail_content in batch:
dc = None
pulp2content = pulp_2to3_detail_content.pulp2content
# only content that supports on_demand download can have entries in LCE
if is_lazy_type:
Expand Down Expand Up @@ -371,13 +372,13 @@ def get_remote_by_importer_id(importer_id):
if pb:
pb.increment()

if has_future:
if has_future and dc:
futures.append(dc)
resolve_futures = len(futures) >= batch_size or pb.done == pb.total
if resolve_futures:
for dc in futures:
await dc.resolution()
futures.clear()
resolve_futures = len(futures) >= batch_size or pb.done == pb.total
if resolve_futures:
for dc in futures:
await dc.resolution()
futures.clear()


class UpdateLCEs(Stage):
Expand Down

0 comments on commit 48a80ec

Please sign in to comment.