# Distributed under the GPL v2
# $Id$
+ 26 Jun 2011; Sebastian Pipping <sping@gentoo.org>
+ modules/catalyst_support.py:
+ Warn about multiple argument errors at the same time
+
25 Jun 2011; Sebastian Pipping <sping@gentoo.org>
targets/netboot/netboot-combine.sh, targets/stage1/stage1-chroot.sh,
targets/stage2/stage2-chroot.sh, targets/support/chroot-functions.sh:
"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: