mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[debian] initial Debian package management support
This commit is contained in:
9
bauh/commons/singleton.py
Normal file
9
bauh/commons/singleton.py
Normal file
@@ -0,0 +1,9 @@
|
||||
class Singleton(type):
|
||||
|
||||
__instance = {}
|
||||
|
||||
def __call__(cls, *args, **kwargs):
|
||||
if cls not in cls.__instance:
|
||||
cls.__instance[cls] = super(Singleton, cls).__call__(*args, **kwargs)
|
||||
|
||||
return cls.__instance[cls]
|
||||
Reference in New Issue
Block a user