diff --git a/app/main.py b/app/main.py index 2a7a3d8..8b61fbf 100644 --- a/app/main.py +++ b/app/main.py @@ -40,9 +40,14 @@ def listen_for_command(errorcode): else: rescode = os.system(cmd) return rescode -#def cleanup(reason: str): -# """Cleans up the environment""" -# print(f"Environment clean-up initialized: {reason}") +def cleanup(): + """Cleans up the environment of all variables""" + del errcode + del wdir + del pid + del host + del user + del colors # Initialization @@ -52,5 +57,5 @@ def listen_for_command(errorcode): errcode = listen_for_command(errcode) except KeyboardInterrupt: print("Keyboard Interrupt initialized. Cleaning up...") - # cleanup("Manually initialized exit [KeyboardInterrupt]") + cleanup() exit(130)