summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-08-10 15:40:19 +0000
committerMatt Wilson <msw@redhat.com>2000-08-10 15:40:19 +0000
commitff29ed4b0e8972ddfdbd9f06497a1b9323298630 (patch)
tree965ccfb1d7a2c6e6d9562d7e02858499dfd5e5f4 /anaconda
parent870bfdda04f0ebbc3f2f22b2286673dfdf96d4e8 (diff)
downloadanaconda-ff29ed4b0e8972ddfdbd9f06497a1b9323298630.tar.gz
anaconda-ff29ed4b0e8972ddfdbd9f06497a1b9323298630.tar.xz
anaconda-ff29ed4b0e8972ddfdbd9f06497a1b9323298630.zip
better error message handling for argument parse
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda6
1 files changed, 5 insertions, 1 deletions
diff --git a/anaconda b/anaconda
index 7a8c81fbf..bb0ee7e39 100755
--- a/anaconda
+++ b/anaconda
@@ -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:]