class Singleton(object):
"""
Singleton design pattern.
"""
_instance = None
def __init__(self):
if self.__class__ is Singleton:
raise TypeError("Cannot instantiate directly.")
@classmethod
def get_instance(cls):
"""Get the class instance."""
if cls._instance is None:
cls._instance = cls()
return cls._instance
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| admin | Folder | 0755 |
|
|
| daemon | Folder | 0755 |
|
|
| exports | Folder | 0755 |
|
|
| hardware | Folder | 0755 |
|
|
| monitors | Folder | 0755 |
|
|
| plugins | Folder | 0755 |
|
|
| ppd | Folder | 0755 |
|
|
| profiles | Folder | 0755 |
|
|
| storage | Folder | 0755 |
|
|
| units | Folder | 0755 |
|
|
| utils | Folder | 0755 |
|
|
| __init__.py | File | 953 B | 0644 |
|
| consts.py | File | 7.84 KB | 0644 |
|
| exceptions.py | File | 568 B | 0644 |
|
| logs.py | File | 3.75 KB | 0644 |
|
| patterns.py | File | 335 B | 0644 |
|
| version.py | File | 171 B | 0644 |
|