diff options
author | Mike Fulbright <msf@redhat.com> | 2003-07-07 19:44:45 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2003-07-07 19:44:45 +0000 |
commit | d875cd783c4fffa53a0c434c88dd131f620aeb88 (patch) | |
tree | cb7e6835fa7494426ef414c27b74e8a4136f4176 /kickstart.py | |
parent | d7cd62fd6dec78eb87f12a01b989d2b225528a94 (diff) | |
download | anaconda-d875cd783c4fffa53a0c434c88dd131f620aeb88.tar.gz anaconda-d875cd783c4fffa53a0c434c88dd131f620aeb88.tar.xz anaconda-d875cd783c4fffa53a0c434c88dd131f620aeb88.zip |
add nicer looking traceback than current one when you have an unrecognized kickstart directive when parsing
Diffstat (limited to 'kickstart.py')
-rw-r--r-- | kickstart.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kickstart.py b/kickstart.py index 79458df6b..328fd24a2 100644 --- a/kickstart.py +++ b/kickstart.py @@ -680,8 +680,12 @@ class KickstartBase(BaseInstallClass): n = string.strip (n) packages.append(n) elif where == "commands": - if handlers[args[0]]: - handlers[args[0]](id, args[1:]) + try: + if handlers[args[0]]: + handlers[args[0]](id, args[1:]) + except: + # unrecognized command + raise SyntaxError, "Unrecognized ks command: %s\nOn the line: %s" % (args[0], n) elif where in ["pre", "post", "traceback"]: script = script + n else: |