mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
Config: allow multiple config topics
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
6fc923a371
commit
1e5f7c3ec4
@ -44,7 +44,7 @@ date_fmt = '%Y-%m-%d %H:%M:%S'
|
||||
log_fmt = '%(asctime)-15s %(levelname)-8s %(message)s'
|
||||
log = logging.getLogger()
|
||||
|
||||
cfg = Config(SYSCONFDIR)
|
||||
cfg = Config(SYSCONFDIR, 'doorlockd')
|
||||
|
||||
|
||||
class Logic:
|
||||
|
@ -1,4 +1,4 @@
|
||||
[doorlock]
|
||||
[doorlockd]
|
||||
|
||||
DEBUG = False
|
||||
SIMULATE_SERIAL = False
|
||||
|
@ -32,9 +32,8 @@ def check_exists(func):
|
||||
|
||||
|
||||
class Config:
|
||||
config_topic = 'doorlock'
|
||||
|
||||
def __init__(self, sysconfdir):
|
||||
def __init__(self, sysconfdir, config_topic):
|
||||
self.config_topic = config_topic
|
||||
self.config = ConfigParser()
|
||||
self.config.read(join(sysconfdir, 'doorlockd.cfg'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user