mirror of
https://github.com/norohind/jubilant-system-core.git
synced 2025-06-20 16:23:52 +03:00
Remove print traceback from shutdown_callback
This commit is contained in:
parent
a3a87edea1
commit
52437392df
3
main.py
3
main.py
@ -1,7 +1,6 @@
|
|||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import traceback
|
|
||||||
|
|
||||||
import FAPI
|
import FAPI
|
||||||
import signal
|
import signal
|
||||||
@ -22,7 +21,7 @@ def shutdown_callback(sig: int, frame) -> None:
|
|||||||
frame_info = inspect.getframeinfo(frame)
|
frame_info = inspect.getframeinfo(frame)
|
||||||
func = frame_info.function
|
func = frame_info.function
|
||||||
code_line = frame_info.code_context[0]
|
code_line = frame_info.code_context[0]
|
||||||
logger.info(f'Currently at {func}:{frame_info.lineno}: {code_line!r}\n{traceback.print_tb(frame)}')
|
logger.info(f'Currently at {func}:{frame_info.lineno}: {code_line!r}')
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.info(f"Can't detect where we are because {e}")
|
logger.info(f"Can't detect where we are because {e}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user