Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to using PublishedMetada.create_from_file() #118

Merged
merged 1 commit into from Sep 26, 2019

Conversation

dkliban
Copy link
Member

@dkliban dkliban commented Sep 19, 2019

@dkliban dkliban force-pushed the publishedmetadata branch 2 times, most recently from 17642be to 2dd366e Compare September 26, 2019 01:02
Required PR: https://github.com/pulp/pulpcore/pull/303/

re: #5304
https://pulp.plan.io/issues/5304
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sounds like the information to go in the commit message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep ... fixed it now.

publication=publication,
file=File(open(package_index_path, "rb")),
package_index = PublishedMetadata.create_from_file(
publication=publication, file=File(open(package_index_path, "rb"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the relative_path determined in this PublishedMetadata?

Copy link
Member Author

@dkliban dkliban Sep 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the relative_path is passed in to create_from_file, then that value is used. If it is not passed in, the file name from the file object is used.

https://docs.pulpproject.org/en/pulpcore-plugin/nightly/api-reference/models.html#pulpcore.plugin.models.PublishedMetadata.create_from_file

@dkliban dkliban merged commit e719560 into pulp:master Sep 26, 2019
@dkliban dkliban deleted the publishedmetadata branch September 26, 2019 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants