diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/argparse_oe.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py index bf6eb17197..9bdfc1ceca 100644 --- a/scripts/lib/argparse_oe.py +++ b/scripts/lib/argparse_oe.py | |||
@@ -167,3 +167,10 @@ class OeHelpFormatter(argparse.HelpFormatter): | |||
167 | return '\n'.join(lines) | 167 | return '\n'.join(lines) |
168 | else: | 168 | else: |
169 | return super(OeHelpFormatter, self)._format_action(action) | 169 | return super(OeHelpFormatter, self)._format_action(action) |
170 | |||
171 | def int_positive(value): | ||
172 | ivalue = int(value) | ||
173 | if ivalue <= 0: | ||
174 | raise argparse.ArgumentTypeError( | ||
175 | "%s is not a positive int value" % value) | ||
176 | return ivalue | ||