Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created January 18, 2021 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlsherrill/fc38931fa490db98cfce59daba9849f6 to your computer and use it in GitHub Desktop.
Save jlsherrill/fc38931fa490db98cfce59daba9849f6 to your computer and use it in GitHub Desktop.
Pulp3 migration treat all files as on_demand (not downloaded)
diff --git a/pulp_2to3_migration/app/pre_migration.py b/pulp_2to3_migration/app/pre_migration.py
index 899a08c..4adcd68 100644
--- a/pulp_2to3_migration/app/pre_migration.py
+++ b/pulp_2to3_migration/app/pre_migration.py
@@ -151,7 +151,7 @@ def pre_migrate_content_type(content_model, mutable_type, lazy_type, premigrate_
pulp2detail_pb.total -= 1
continue
- downloaded = record.downloaded if hasattr(record, 'downloaded') else False
+ downloaded = False
if set_pulp2_repo:
# This content requires to set pulp 2 repo. E.g. for errata, because 1 pulp2
@@ -247,7 +247,7 @@ def pre_migrate_content_type(content_model, mutable_type, lazy_type, premigrate_
for relation in content_relations:
record = pulp2_content_by_id[relation.pulp2_unit_id]
- downloaded = record.downloaded if hasattr(record, 'downloaded') else False
+ downloaded = False
item = Pulp2Content(
pulp2_id=record.id,
pulp2_content_type_id=record._content_type_id,
@jlsherrill
Copy link
Author

good for testing customer dbs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment