This commit is contained in:
2025-12-05 08:08:44 +08:00
parent e0d4d0c364
commit 1f10abfb32
2909 changed files with 2470486 additions and 3024 deletions

View File

@@ -0,0 +1,23 @@
"""
The purpose of the module is mostly for testing: close everything and prepare for source reload
"""
from __future__ import print_function
from ngSkinTools2.api.log import getLogger
handlers = []
log = getLogger("cleanup")
def registerCleanupHandler(handler):
handlers.append(handler)
def cleanup():
while len(handlers) > 0:
handler = handlers.pop()
try:
handler()
except Exception as err:
log.error(err)