If you want something to always start, even with errors, use try: finally: like this -
def main(): try: execute_app() finally: handle_cleanup() if __name__=='__main__': main()
If you want to handle exceptions as well, you can insert with the exception of: until the final:
Brian C. Lane Oct 03 2018-10-10 at 16:38
source share