This commit is contained in:
2025-11-30 14:49:16 +08:00
parent 021c593241
commit de46c4b073
1406 changed files with 526774 additions and 1221 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)