From: Michael Prokop Date: Tue, 24 Mar 2009 21:33:33 +0000 (+0100) Subject: Fix --quiet/--verbose option handling X-Git-Tag: v0.9.3~2 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=851503fa7a9d1f48e0dbbdd8956126364034d5a0;hp=b5aabbd2b2b1ce66f187ae404aee174a837e6479 Fix --quiet/--verbose option handling --- diff --git a/debian/changelog b/debian/changelog index 7f1b308..f641b58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,11 @@ grml2usb (0.9.3) UNRELEASED; urgency=low (Thanks to Ralf Gross for the report and relevant information.) * Also add specified bootoptions to default entry in configuration file of grub version 1. (Thanks to Ralf Gross for the bugreport.) + * Make sure that options "--quiet" and "--verbose" aren't accepted + at the same time in the command line. Thanks for bugreport and + code example, Karl Voit! - -- Michael Prokop Tue, 24 Mar 2009 17:45:45 +0100 + -- Michael Prokop Tue, 24 Mar 2009 22:32:05 +0100 grml2usb (0.9.2) unstable; urgency=low diff --git a/grml2usb b/grml2usb index bc58eac..06c3c9c 100755 --- a/grml2usb +++ b/grml2usb @@ -1562,6 +1562,9 @@ def handle_compat_warning(device): def handle_logging(): """Log handling and configuration""" + if options.verbose and options.quiet: + parser.error("please use either verbose (--verbose) or quiet (--quiet) option") + if options.verbose: FORMAT = "Debug: %(asctime)-15s %(message)s" logging.basicConfig(level=logging.DEBUG, format=FORMAT)