From 01ed11d39312404c265da1a53938c921ce03c4f9 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 22 Jan 2021 10:20:41 +0100 Subject: [PATCH] Fix --grub and --syslinux handling With commit 3664e4ae we removed an argument from the grub_option() and syslinux_warning() callback functions, which was reported as false positives by vulture tool. Fixes regression from 3664e4ae, failing grml2usb execution with --grub (and deprecated --syslinux) command line option with: | TypeError: grub_option() takes 3 positional arguments but 4 were given Thanks: Ralf Moll for the bugreport --- grml2usb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grml2usb b/grml2usb index d8c5053..8f689a9 100755 --- a/grml2usb +++ b/grml2usb @@ -64,7 +64,7 @@ RE_P_PARTITION = re.compile(r"(.*?\d+)p(\d+)$") RE_LOOP_DEVICE = re.compile(r"/dev/loop\d+$") -def syslinux_warning(option, opt, opt_parser): +def syslinux_warning(option, opt, _value, opt_parser): """A helper function for printing a warning about deprecated option""" # pylint: disable-msg=W0613 sys.stderr.write( @@ -75,7 +75,7 @@ def syslinux_warning(option, opt, opt_parser): # if grub option is set, unset syslinux option -def grub_option(option, opt, opt_parser): +def grub_option(option, opt, _value, opt_parser): """A helper function adjusting other option values""" # pylint: disable-msg=W0613 setattr(opt_parser.values, option.dest, True) -- 2.1.4