Moved code up one level post build folder creation

This commit is contained in:
2026-01-07 17:36:47 -06:00
parent 5c808c579a
commit d55bc3ae97
91 changed files with 0 additions and 0 deletions

23
src/utils/singleton.py Normal file
View File

@@ -0,0 +1,23 @@
# Python imports
# Lib imports
# Application imports
class SingletonError(Exception):
pass
class Singleton:
ccount = 0
def __new__(cls, *args, **kwargs):
obj = super(Singleton, cls).__new__(cls)
cls.ccount += 1
if cls.ccount == 2:
raise SingletonError(f"Exceeded {cls.__name__} instantiation limit...")
return obj