From fa893a346d4126f305ebbf295b3e9163e448d139 Mon Sep 17 00:00:00 2001 From: derickdiaz Date: Thu, 19 Oct 2023 04:58:45 -0500 Subject: [PATCH] Checks if emitter is null incase build_emitters throws a ConfigError --- dnf/automatic/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py index ca76af1fa5..96800dbdc7 100644 --- a/dnf/automatic/main.py +++ b/dnf/automatic/main.py @@ -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