Skip to content

Commit

Permalink
Avoided to die for a transaction warning and added a Warning dialog. Be
Browse files Browse the repository at this point in the history
aware that the transaction is not cleaned though
  • Loading branch information
anaselli committed Nov 17, 2024
1 parent 1ecca4d commit b926d56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dnfdragora/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2272,9 +2272,10 @@ def _OnBuildTransaction(self, info):
if result == 1: #Transaction WARNING
errors = self.backend.TransactionProblems(sync=True)
err = "".join(errors) if isinstance(errors, list) else errors if type(errors) is str else repr(errors);
dialogs.warningMsgBox({'title' : _('Transaction with warnings',), 'text' : err.replace("\n", "<br>"), 'richtext' : True })
logger.warning("Transaction with warnings: %s", repr(errors))

ok = result == 0 or result == 1
ok = result == 0 # Avoid to die "or result == 1" TODO manage Warning
if ok:
self.started_transaction = {
'Install': {},
Expand Down

0 comments on commit b926d56

Please sign in to comment.