diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/argparse_oe.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py index bf3ebaddfd..95b42e75ea 100644 --- a/scripts/lib/argparse_oe.py +++ b/scripts/lib/argparse_oe.py | |||
@@ -16,8 +16,13 @@ class ArgumentParser(argparse.ArgumentParser): | |||
16 | super(ArgumentParser, self).__init__(*args, **kwargs) | 16 | super(ArgumentParser, self).__init__(*args, **kwargs) |
17 | 17 | ||
18 | def error(self, message): | 18 | def error(self, message): |
19 | sys.stderr.write('ERROR: %s\n' % message) | 19 | """error(message: string) |
20 | self.print_help() | 20 | |
21 | Prints a help message incorporating the message to stderr and | ||
22 | exits. | ||
23 | """ | ||
24 | self._print_message('%s: error: %s\n' % (self.prog, message), sys.stderr) | ||
25 | self.print_help(sys.stderr) | ||
21 | sys.exit(2) | 26 | sys.exit(2) |
22 | 27 | ||
23 | def error_subcommand(self, message, subcommand): | 28 | def error_subcommand(self, message, subcommand): |