mirror of
https://github.com/SELinuxProject/setools
synced 2025-01-15 11:40:47 +00:00
cli: switch to logging.exception for debug reporting of unrecoverable exception.
This commit is contained in:
parent
c017bd7cfa
commit
7d88a1424e
5
apol
5
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)
|
||||
|
3
sediff
3
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)
|
||||
|
||||
|
3
sedta
3
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)
|
||||
|
||||
|
5
seinfo
5
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)
|
||||
|
@ -123,8 +123,7 @@ try:
|
||||
|
||||
except Exception as err:
|
||||
if args.debug:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
logging.exception(str(err))
|
||||
else:
|
||||
print(err)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user