Replace tools.message_exit() with sys.exit()
sys.exit()
can print an error and send the appropriate error status to the shell.
Edited
Apr 07, 2021
by
Moul