diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-05-06 15:50:54 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-05-06 15:50:54 -0400 |
commit | ae4a1c0b3551aadba6ea09bd6211e5c617d034a4 (patch) | |
tree | 9f221379ac3b5b1056463dfd5425ec03ed7fe9a8 /cobbler | |
parent | 31645710cbb926f6859f38e5feb11e3263925478 (diff) | |
download | third_party-cobbler-ae4a1c0b3551aadba6ea09bd6211e5c617d034a4.tar.gz third_party-cobbler-ae4a1c0b3551aadba6ea09bd6211e5c617d034a4.tar.xz third_party-cobbler-ae4a1c0b3551aadba6ea09bd6211e5c617d034a4.zip |
More exception handling.
Diffstat (limited to 'cobbler')
-rwxr-xr-x | cobbler/cobbler.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py index 160dbc5..0e15175 100755 --- a/cobbler/cobbler.py +++ b/cobbler/cobbler.py @@ -20,6 +20,7 @@ import os import os.path import traceback import optparse +import string import commands import cexceptions from cexceptions import * @@ -52,11 +53,12 @@ def main(): try: return BootCLI().run(sys.argv) except Exception, exc: + (t, v, tb) = sys.exc_info() try: getattr(exc, "from_cobbler") print str(exc)[1:-1] except: - traceback.print_exc() + print string.join(traceback.format_list(traceback.extract_tb(tb))) return 1 if __name__ == "__main__": |