From e5dc7410a5fa862298f2a830ffb16f91b4354fd1 Mon Sep 17 00:00:00 2001 From: Marek Blaha Date: Thu, 12 Dec 2024 08:09:48 +0100 Subject: [PATCH] automatic: Fix incorrect Error class instantiation dnf.exceptions.Error class constructor accepts only one argument - error message. --- dnf/automatic/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py index 21aa82b75d..1a1e1cf069 100644 --- a/dnf/automatic/main.py +++ b/dnf/automatic/main.py @@ -379,7 +379,7 @@ def main(args): (conf.commands.reboot == 'when-needed' and base.reboot_needed())): exit_code = os.waitstatus_to_exitcode(os.system(conf.commands.reboot_command)) if exit_code != 0: - raise dnf.exceptions.Error('reboot command returned nonzero exit code: %d', exit_code) + raise dnf.exceptions.Error('reboot command returned nonzero exit code: %d' % exit_code) except dnf.exceptions.Error as exc: logger.error(_('Error: %s'), ucd(exc)) if conf is not None and conf.emitters.send_error_messages and emitters is not None: