mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix sighandler args > sig, args defined elsewhere
This commit is contained in:
parent
a871e09994
commit
3e39463e27
14
main.py
14
main.py
@ -148,10 +148,10 @@ if __name__ == '__main__':
|
|||||||
project_root = os.path.dirname(__file__)
|
project_root = os.path.dirname(__file__)
|
||||||
controller.set_project_root(project_root)
|
controller.set_project_root(project_root)
|
||||||
|
|
||||||
def sigterm_handler(*args):
|
def sigterm_handler(*sig):
|
||||||
print() # for newline
|
print() # for newline
|
||||||
logger.info(f"Recieved SIGINT [{args[0]}], stopping Crafty...")
|
logger.info(f"Recieved SIGINT [{sig[0]}], stopping Crafty...")
|
||||||
console.info(f"Recieved SIGINT [{args[0]}], stopping Crafty...")
|
console.info(f"Recieved SIGINT [{sig[0]}], stopping Crafty...")
|
||||||
tasks_manager._main_graceful_exit()
|
tasks_manager._main_graceful_exit()
|
||||||
Crafty.universal_exit()
|
Crafty.universal_exit()
|
||||||
|
|
||||||
@ -162,8 +162,8 @@ if __name__ == '__main__':
|
|||||||
Crafty.cmdloop()
|
Crafty.cmdloop()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print() # for newline
|
print() # for newline
|
||||||
logger.info(f"Recieved SIGINT, stopping Crafty...")
|
logger.info("Recieved SIGINT, stopping Crafty...")
|
||||||
console.info(f"Recieved SIGINT, stopping Crafty...")
|
console.info("Recieved SIGINT, stopping Crafty...")
|
||||||
tasks_manager._main_graceful_exit()
|
tasks_manager._main_graceful_exit()
|
||||||
Crafty.universal_exit()
|
Crafty.universal_exit()
|
||||||
else:
|
else:
|
||||||
@ -174,8 +174,8 @@ if __name__ == '__main__':
|
|||||||
break
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.info(f"Recieved SIGINT, stopping Crafty...")
|
logger.info("Recieved SIGINT, stopping Crafty...")
|
||||||
console.info(f"Recieved SIGINT, stopping Crafty...")
|
console.info("Recieved SIGINT, stopping Crafty...")
|
||||||
break
|
break
|
||||||
tasks_manager._main_graceful_exit()
|
tasks_manager._main_graceful_exit()
|
||||||
Crafty.universal_exit()
|
Crafty.universal_exit()
|
||||||
|
Loading…
Reference in New Issue
Block a user