From 130d6b91694a93a142be8c3767bfc711245dea1c 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 e9273c5dd6..118bb20474 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 Exception as exc: logger.error(_('Error: %s'), ucd(exc)) if conf is not None and conf.emitters.send_error_messages and emitters is not None: