Move config attribute to dedicated class.

main
clerie 3 years ago
parent a8f007d421
commit 9ff797edca

@ -1,6 +1,6 @@
#!/usr/bin/env python3
class ControllerConfig:
class ConfigBase:
def __init__(self, c):
self._c = c
@ -10,15 +10,15 @@ class ControllerConfig:
else:
raise AttributeError()
class DectConfig:
class ControllerConfig(ConfigBase):
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()
class DectConfig(ConfigBase):
def __init__(self, c):
self._c = c
def check(self):
return True
@ -39,12 +39,6 @@ class ExtensionConfig:
self.num = c[0]
self._c = c[1]
def __getattr__(self, name):
if name in self._c.keys():
return self._c.get(name)
else:
raise AttributeError()
class Extensions:
def __init__(self, c):

Loading…
Cancel
Save