Hacker, Robots, Congregations now singletons.
This commit is contained in:
parent
7e6b757e3a
commit
1be1aac9d0
|
@ -122,6 +122,12 @@ class Hackers(Entry):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
kind = "ou"
|
kind = "ou"
|
||||||
|
_instance = None
|
||||||
|
|
||||||
|
def __new__(cls, *args, **kwargs):
|
||||||
|
if cls._instance is None:
|
||||||
|
cls._instance = object.__new__(cls)
|
||||||
|
return cls._instance
|
||||||
|
|
||||||
def __init__(self, client, *args, **kwargs):
|
def __init__(self, client, *args, **kwargs):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
@ -142,6 +148,12 @@ class Robots(Entry):
|
||||||
|
|
||||||
kind = "ou"
|
kind = "ou"
|
||||||
_name = "Services"
|
_name = "Services"
|
||||||
|
_instance = None
|
||||||
|
|
||||||
|
def __new__(cls, *args, **kwargs):
|
||||||
|
if cls._instance is None:
|
||||||
|
cls._instance = object.__new__(cls)
|
||||||
|
return cls._instance
|
||||||
|
|
||||||
def __init__(self, client, *args, **kwargs):
|
def __init__(self, client, *args, **kwargs):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
@ -162,6 +174,12 @@ class Congregations(Entry):
|
||||||
|
|
||||||
kind = "ou"
|
kind = "ou"
|
||||||
_name = "Groups"
|
_name = "Groups"
|
||||||
|
_instance = None
|
||||||
|
|
||||||
|
def __new__(cls, *args, **kwargs):
|
||||||
|
if cls._instance is None:
|
||||||
|
cls._instance = object.__new__(cls)
|
||||||
|
return cls._instance
|
||||||
|
|
||||||
def __init__(self, client, *args, **kwargs):
|
def __init__(self, client, *args, **kwargs):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user