From b415219679e86da8d22a032b301a9feb9f1b7e08 Mon Sep 17 00:00:00 2001 From: Don Penney Date: Wed, 29 Apr 2020 17:40:06 -0400 Subject: [PATCH] Update DNF transaction exception handling Add exception handling for dnf.exceptions.Error to DNF transation call, to handle additional potential failure cases like file conflicts. Change-Id: I3f5719a395a99da593df7175e89ff2e6180b9ce6 Closes-Bug: 1875978 Signed-off-by: Don Penney --- cgcs-patch/cgcs-patch/cgcs_patch/patch_agent.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cgcs-patch/cgcs-patch/cgcs_patch/patch_agent.py b/cgcs-patch/cgcs-patch/cgcs_patch/patch_agent.py index e4cceb8c..eb128419 100644 --- a/cgcs-patch/cgcs-patch/cgcs_patch/patch_agent.py +++ b/cgcs-patch/cgcs-patch/cgcs_patch/patch_agent.py @@ -628,9 +628,11 @@ class PatchAgent(PatchService): try: transaction_rc = self.resolve_dnf_transaction() except dnf.exceptions.DepsolveError: - LOG.error("Failures resolving dependencies in transaction") + LOG.exception("Failures resolving dependencies in transaction") except dnf.exceptions.DownloadError: - LOG.error("Failures downloading in transaction") + LOG.exception("Failures downloading in transaction") + except dnf.exceptions.Error: + LOG.exception("Failure resolving transaction") if not transaction_rc: LOG.error("Failures occurred during transaction")