dnf-json: Return an error when repo setup fails
This commit is contained in:
parent
8d71773f7d
commit
8f8187061f
1 changed files with 4 additions and 1 deletions
5
dnf-json
5
dnf-json
|
|
@ -88,7 +88,10 @@ cachedir = arguments["cachedir"]
|
|||
module_platform_id = arguments["module_platform_id"]
|
||||
|
||||
with tempfile.TemporaryDirectory() as persistdir:
|
||||
base = create_base(repos, module_platform_id, persistdir, cachedir)
|
||||
try:
|
||||
base = create_base(repos, module_platform_id, persistdir, cachedir)
|
||||
except dnf.exceptions.RepoError as e:
|
||||
exit_with_dnf_error("RepoError", f"Error occurred when setting up repo: {e}")
|
||||
|
||||
if command == "dump":
|
||||
packages = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue