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 <don.penney@windriver.com>
This commit is contained in:
Don Penney 2020-04-29 17:40:06 -04:00
parent 6d1cd07e39
commit b415219679
1 changed files with 4 additions and 2 deletions

View File

@ -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")