Skip to content

Commit

Permalink
Added KeyError exception handler
Browse files Browse the repository at this point in the history
  • Loading branch information
anaselli committed Sep 15, 2024
1 parent 75c0027 commit db2263f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/dnfdragora
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ if __name__ == "__main__":

main_gui.handleevent()

except KeyError as e:
logger.error("KeyError: %s ", e)
dialogs.warningMsgBox({'title' : _("Sorry"), "text": _("Error occurred:%(NL)s%(error)s")%{'NL': "\n",'error' : str(e)}})
except NameError as e:
logger.error("dnfdaemon NameError: %s ", e)
dialogs.warningMsgBox({'title' : _("Sorry"), "text": _("dnfdaemon name error occurred:%(NL)s%(error)s")%{'NL': "\n",'error' : str(e)}})
Expand Down

0 comments on commit db2263f

Please sign in to comment.