aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/argparse_oe.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/argparse_oe.py')
-rw-r--r--scripts/lib/argparse_oe.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
new file mode 100644
index 0000000000..c2fee6de05
--- /dev/null
+++ b/scripts/lib/argparse_oe.py
@@ -0,0 +1,11 @@
+import sys
+import argparse
+
+class ArgumentParser(argparse.ArgumentParser):
+ """Our own version of argparse's ArgumentParser"""
+
+ def error(self, message):
+ sys.stderr.write('ERROR: %s\n' % message)
+ self.print_help()
+ sys.exit(2)
+