uncloud-cli/ucloud_cli/helper.py
2019-12-02 22:37:14 +05:00

9 lines
270 B
Python

import os
import sys
def exception_handler(exception_type, exception, traceback):
if bool(os.getenv('DEBUG_UCLOUD')) is True:
sys.__excepthook__(exception_type, exception, traceback)
else:
print("%s: %s" % (exception_type.__name__, exception))