This commit is contained in:
2025-11-24 08:27:50 +08:00
parent 6940f17517
commit e76152945e
104 changed files with 10003 additions and 0 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)