diff options
author | Matt Wilson <msw@redhat.com> | 2000-08-10 15:40:19 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-08-10 15:40:19 +0000 |
commit | ff29ed4b0e8972ddfdbd9f06497a1b9323298630 (patch) | |
tree | 965ccfb1d7a2c6e6d9562d7e02858499dfd5e5f4 /anaconda | |
parent | 870bfdda04f0ebbc3f2f22b2286673dfdf96d4e8 (diff) | |
download | anaconda-ff29ed4b0e8972ddfdbd9f06497a1b9323298630.tar.gz anaconda-ff29ed4b0e8972ddfdbd9f06497a1b9323298630.tar.xz anaconda-ff29ed4b0e8972ddfdbd9f06497a1b9323298630.zip |
better error message handling for argument parse
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -42,12 +42,16 @@ from exception import handleException setverPath = None -(args, extra) = isys.getopt(sys.argv[1:], 'GTRxtdr:fm:', +try: + (args, extra) = isys.getopt(sys.argv[1:], 'GTRxtdr:fm:', [ 'gui', 'text', 'reconfig', 'xmode', 'test', 'debug', 'method=', 'rootpath=', 'testpath=', 'mountfs', 'traceonly', 'kickstart=', 'lang=', 'keymap=', 'kbdtype=', 'module=', 'class=', 'expert', 'serial' ]) +except TypeError, msg: + print "Error:", msg + sys.exit(-1) # save because we're about to munge argv [execname] = string.split(sys.argv[0], '/')[-1:] |