From 465a3b42fb0cc92c03600b820bca0007fd9c3227 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 8 Dec 2018 18:36:50 -0700 Subject: [PATCH] Kill all tmux panes before exiting --- .bin/Scripts/hw-diags-menu | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.bin/Scripts/hw-diags-menu b/.bin/Scripts/hw-diags-menu index e60f8fc4..6f0247cd 100755 --- a/.bin/Scripts/hw-diags-menu +++ b/.bin/Scripts/hw-diags-menu @@ -9,20 +9,24 @@ import sys os.chdir(os.path.dirname(os.path.realpath(__file__))) sys.path.append(os.getcwd()) from functions.hw_diags import * +from functions.tmux import * init_global_vars() if __name__ == '__main__': - try: - # Show menu - state = State() - menu_diags(state, sys.argv) - - # Done - #print_standard('\nDone.') - #pause("Press Enter to exit...") - exit_script() - except SystemExit: - pass - except: - major_exception() + try: + # Show menu + state = State() + menu_diags(state, sys.argv) + # Done + #print_standard('\nDone.') + #pause("Press Enter to exit...") + exit_script() + except SystemExit: + tmux_kill_all_panes() + pass + except: + tmux_kill_all_panes() + major_exception() + +# vim: sts=2 sw=2 ts=2