mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-12 09:34:57 +08:00
Add additional error checking to get_module_modulemd
This commit is contained in:
@@ -211,7 +211,10 @@ def get_module_modulemd(session, module_info, strict=False):
|
||||
found. If strict=True, then a ValueError is raised.
|
||||
:return: ModuleMetadata instance
|
||||
"""
|
||||
yaml = get_module(session, module_info, strict=strict)['modulemd']
|
||||
yaml = None
|
||||
module = get_module(session, module_info, strict=strict)
|
||||
if module:
|
||||
yaml = module['modulemd']
|
||||
if not yaml:
|
||||
if strict:
|
||||
raise ValueError("Failed to find modulemd entry in PDC for "
|
||||
|
||||
Reference in New Issue
Block a user