From 8a8fe26b95f4bce8e0fb3c0a00b4fdae52345850 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 13 Jul 2023 21:54:24 -0700 Subject: [PATCH] hotfix: repair returncode catch --- pv2/importer/operation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pv2/importer/operation.py b/pv2/importer/operation.py index bd3f2bc..e0a254a 100644 --- a/pv2/importer/operation.py +++ b/pv2/importer/operation.py @@ -81,7 +81,7 @@ class Import: ] command_to_send = ' '.join(command_to_send) returned = processor.run_proc_no_output_shell(command_to_send) - if returned != 0: + if returned.returncode != 0: rpmerr = returned.stderr raise err.RpmOpenError(f'This package could not be unpacked:\n\n{rpmerr}') @@ -106,7 +106,7 @@ class Import: ] command_to_send = ' '.join(command_to_send) returned = processor.run_proc_no_output_shell(command_to_send) - if returned != 0: + if returned.returncode != 0: rpmerr = returned.stderr raise err.RpmBuildError(f'There was error packing the rpm:\n\n{rpmerr}') wrote_regex = r'Wrote:\s+(.*\.rpm)'