Skip to content

Commit

Permalink
automatic: Fix incorrect Error class instantiation
Browse files Browse the repository at this point in the history
dnf.exceptions.Error class constructor accepts only one argument - error
message.
  • Loading branch information
m-blaha authored and kontura committed Dec 12, 2024
1 parent 067591d commit 130d6b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnf/automatic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 130d6b9

Please sign in to comment.