summaryrefslogtreecommitdiffstats
path: root/firstaidkit
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-03-07 18:00:40 +0100
committerJoel Andres Granados <jgranado@redhat.com>2008-03-07 18:00:40 +0100
commitd86ecbc51a2685592afffdc9f8bbbd16871c31fa (patch)
tree309cf1fe0bad9910535afeeb1c92f62f34520810 /firstaidkit
parentdc42d0131730c8e793b273374133d6e0c407e751 (diff)
downloadfirstaidkit-d86ecbc51a2685592afffdc9f8bbbd16871c31fa.tar.gz
firstaidkit-d86ecbc51a2685592afffdc9f8bbbd16871c31fa.tar.xz
firstaidkit-d86ecbc51a2685592afffdc9f8bbbd16871c31fa.zip
Be a little bit more helpfull when the user make a mistake with the command
Diffstat (limited to 'firstaidkit')
-rwxr-xr-xfirstaidkit12
1 files changed, 9 insertions, 3 deletions
diff --git a/firstaidkit b/firstaidkit
index 42c4e18..4991711 100755
--- a/firstaidkit
+++ b/firstaidkit
@@ -104,9 +104,15 @@ def usage(name):
""" % (name, name, name, name, name, name)
if __name__=="__main__":
- params, rest = getopt.getopt(sys.argv[1:], "aftc:r:vl:x:F:g:P:h",
- ["list", "info=", "auto", "flow", "task", "config=", "root=", "verbose", "log=", "exclude=",
- "flag=", "gui=", "plugin-path=", "print-config", "help"])
+ try:
+ params, rest = getopt.getopt(sys.argv[1:], "aftc:r:vl:x:F:g:P:h",
+ ["list", "info=", "auto", "flow", "task", "config=", "root=",
+ "verbose", "log=", "exclude=","flag=", "gui=", "plugin-path=",
+ "print-config", "help"])
+ except Exception, e:
+ print "\nError parsing the argument line: ",e,"\n"
+ usage(sys.argv)
+ sys.exit(1)
#
# Preliminary checks before we parse the options.