Only register tmux atexit when running HW Diags
* Prevents unintended killing of tmux panes when importing wk or wk.hw
This commit is contained in:
parent
c0b6606758
commit
6da34c1f2b
1 changed files with 2 additions and 4 deletions
|
|
@ -19,10 +19,6 @@ from wk.hw import obj as hw_obj
|
||||||
from wk.hw import sensors as hw_sensors
|
from wk.hw import sensors as hw_sensors
|
||||||
|
|
||||||
|
|
||||||
# atexit functions
|
|
||||||
atexit.register(tmux.kill_all_panes)
|
|
||||||
#TODO: Add state/dev data dump debug function
|
|
||||||
|
|
||||||
# STATIC VARIABLES
|
# STATIC VARIABLES
|
||||||
DOCSTRING = f'''{cfg.main.KIT_NAME_FULL}: Hardware Diagnostics
|
DOCSTRING = f'''{cfg.main.KIT_NAME_FULL}: Hardware Diagnostics
|
||||||
|
|
||||||
|
|
@ -623,6 +619,8 @@ def main():
|
||||||
raise RuntimeError('tmux session not found')
|
raise RuntimeError('tmux session not found')
|
||||||
|
|
||||||
# Init
|
# Init
|
||||||
|
atexit.register(tmux.kill_all_panes)
|
||||||
|
#TODO: Add state/dev data dump debug function
|
||||||
menu = build_menu(cli_mode=args['--cli'], quick_mode=args['--quick'])
|
menu = build_menu(cli_mode=args['--cli'], quick_mode=args['--quick'])
|
||||||
state = State()
|
state = State()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue