From: Sebastian Pipping Date: Sun, 26 Jun 2011 01:35:10 +0000 (+0200) Subject: Warn about multiple argument errors at the same time X-Git-Tag: CATALYST_2_0_6_917~5 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=466e2487a78bb554c3afabe0ab6b9a38e31e37bd;p=catalyst.git Warn about multiple argument errors at the same time --- diff --git a/ChangeLog b/ChangeLog index ea5b5677..23aa9854 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ # Distributed under the GPL v2 # $Id$ + 26 Jun 2011; Sebastian Pipping + modules/catalyst_support.py: + Warn about multiple argument errors at the same time + 25 Jun 2011; Sebastian Pipping targets/netboot/netboot-combine.sh, targets/stage1/stage1-chroot.sh, targets/stage2/stage2-chroot.sh, targets/support/chroot-functions.sh: diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 12aadc10..39653a42 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -676,15 +676,19 @@ def addl_arg_parse(myspec,addlargs,requiredspec,validspec): "helper function to help targets parse additional arguments" global valid_config_file_values + messages = [] for x in addlargs.keys(): if x not in validspec and x not in valid_config_file_values and x not in requiredspec: - raise CatalystError, "Argument \""+x+"\" not recognized." + messages.append("Argument \""+x+"\" not recognized.") else: myspec[x]=addlargs[x] for x in requiredspec: if not myspec.has_key(x): - raise CatalystError, "Required argument \""+x+"\" not specified." + messages.append("Required argument \""+x+"\" not specified.") + + if messages: + raise CatalystError, '\n\tAlso: '.join(messages) def touch(myfile): try: