From: David Howells Date: Thu, 10 Apr 2014 10:19:56 +0000 (+0100) Subject: Save raw argument list for each switch X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e242261a463fb1fa7343f5c0cc5651f11919b2aa;p=users%2Fdhowells%2Fkafs-utils.git Save raw argument list for each switch Several of the switch parameters have their argument lists cooked by the argument parser. This means we cannot get at the original string(s) when producing error messages. Save the raw argument list for each switch in the parameters dictionary as a list of strings attached to a key of "raw.". Signed-off-by: David Howells --- diff --git a/suite/argparse.py b/suite/argparse.py index 812f8b1..0e58e66 100644 --- a/suite/argparse.py +++ b/suite/argparse.py @@ -187,6 +187,7 @@ def parse_arguments(args, available_arguments): # Call the syntax checker syntax = match[1] + result["raw." + match[0]] = params result[match[0]] = syntax(match[0], params) # Check for missing required arguments