From 7d88a1424ef5d4b609113cef316539d7d6a079aa Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Fri, 4 Mar 2016 13:59:21 -0500 Subject: [PATCH] cli: switch to logging.exception for debug reporting of unrecoverable exception. --- apol | 5 ++--- sediff | 3 +-- sedta | 3 +-- seinfo | 5 ++--- seinfoflow | 3 +-- sesearch | 5 ++--- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/apol b/apol index c3e58f9..712d87c 100755 --- a/apol +++ b/apol @@ -50,9 +50,8 @@ try: except Exception as err: if args.debug: - import traceback - traceback.print_exc() + logging.exception(str(err)) else: print(err) - sys.exit(-1) + sys.exit(1) diff --git a/sediff b/sediff index 34268ca..2586db7 100755 --- a/sediff +++ b/sediff @@ -1112,8 +1112,7 @@ try: except Exception as err: if args.debug: - import traceback - traceback.print_exc() + logging.exception(str(err)) else: print(err) diff --git a/sedta b/sedta index e4d4914..a59567e 100755 --- a/sedta +++ b/sedta @@ -152,8 +152,7 @@ try: except Exception as err: if args.debug: - import traceback - traceback.print_exc() + logging.exception(str(err)) else: print(err) diff --git a/seinfo b/seinfo index 2b50393..2cf9b82 100755 --- a/seinfo +++ b/seinfo @@ -311,9 +311,8 @@ try: except Exception as err: if args.debug: - import traceback - traceback.print_exc() + logging.exception(str(err)) else: print(err) - sys.exit(-1) + sys.exit(1) diff --git a/seinfoflow b/seinfoflow index 7a2d288..5e9f712 100755 --- a/seinfoflow +++ b/seinfoflow @@ -123,8 +123,7 @@ try: except Exception as err: if args.debug: - import traceback - traceback.print_exc() + logging.exception(str(err)) else: print(err) diff --git a/sesearch b/sesearch index 7bcdfd2..67c5c45 100755 --- a/sesearch +++ b/sesearch @@ -198,9 +198,8 @@ try: except Exception as err: if args.debug: - import traceback - traceback.print_exc() + logging.exception(str(err)) else: print(err) - sys.exit(-1) + sys.exit(1)