Skip to content

Commit

Permalink
Fixed create_modulemd() stacktrace when handling malformed modulmd.
Browse files Browse the repository at this point in the history
fixes #3756.

(cherry picked from commit 5ccddf7)
  • Loading branch information
ggainey committed Oct 16, 2024
1 parent dc3e4b7 commit 615af98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES/3756.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed stacktrace from create_modulemd() when trying to report an error.
12 changes: 6 additions & 6 deletions pulp_rpm/app/modulemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ def create_modulemd(modulemd, snippet):
"Got unexpected data for module {}-{}-{}-{}-{}: "
"profiles failed to parse properly"
).format(
data[PULP_MODULE_ATTR.NAME],
data[PULP_MODULE_ATTR.STREAM],
data[PULP_MODULE_ATTR.VERSION],
data[PULP_MODULE_ATTR.CONTEXT],
data[PULP_MODULE_ATTR.ARCH],
new_module[PULP_MODULE_ATTR.NAME],
new_module[PULP_MODULE_ATTR.STREAM],
new_module[PULP_MODULE_ATTR.VERSION],
new_module[PULP_MODULE_ATTR.CONTEXT],
new_module[PULP_MODULE_ATTR.ARCH],
)
log.warn(msg)
log.warning(msg)
else:
profiles[name] = rpms

Expand Down

0 comments on commit 615af98

Please sign in to comment.