diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-03-07 18:00:40 +0100 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-03-07 18:00:40 +0100 |
commit | d86ecbc51a2685592afffdc9f8bbbd16871c31fa (patch) | |
tree | 309cf1fe0bad9910535afeeb1c92f62f34520810 /firstaidkit | |
parent | dc42d0131730c8e793b273374133d6e0c407e751 (diff) | |
download | firstaidkit-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-x | firstaidkit | 12 |
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. |