You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
469 B
Python
23 lines
469 B
Python
#!/usr/bin/env python3
|
|
|
|
class DectConfig:
|
|
def __init__(self, c):
|
|
self._c = c
|
|
|
|
def __getattr__(self, name):
|
|
if name in self._c.keys():
|
|
return self._c.get(name)
|
|
else:
|
|
raise AttributeError()
|
|
|
|
def check(self):
|
|
return True
|
|
|
|
class Config:
|
|
def __init__(self, c):
|
|
self._c = c
|
|
self.dect = DectConfig(c.get("dect", {}))
|
|
|
|
def check(self):
|
|
return self.dect.check()
|