Skip to content

Commit

Permalink
Checks if emitter is null incase build_emitters throws a ConfigError
Browse files Browse the repository at this point in the history
  • Loading branch information
derickdiaz committed Oct 19, 2023
1 parent 14882a9 commit fa893a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dnf/automatic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ def main(args):
return 1
except dnf.exceptions.Error as exc:
logger.error(_('Error: %s'), ucd(exc))
emitters.notify_error(_('Error: %s') % str(exc))
emitters.commit()
if conf.emitters != None:
emitters.notify_error(_('Error: %s') % str(exc))
emitters.commit()
return 1
return 0

Expand Down

0 comments on commit fa893a3

Please sign in to comment.