move secrets to config
This commit is contained in:
parent
dab054099c
commit
2775a9a4b9
|
@ -8,3 +8,9 @@ gluster:
|
|||
volume: pyledriver
|
||||
mountpoint: /mnt/glusterfs/pyledriver
|
||||
options: backupvolfile-server=example.com
|
||||
secretTable:
|
||||
DISARM: labrie
|
||||
ARM: petrucci
|
||||
INSTANT_ARM: rudess
|
||||
LOCK: myung
|
||||
INSTANT_LOCK: portnoy
|
||||
|
|
|
@ -16,7 +16,7 @@ from functools import partial
|
|||
from collections import namedtuple
|
||||
|
||||
from exceptionThreading import ExceptionThread
|
||||
from config import stateFile
|
||||
from config import configFile, stateFile
|
||||
from sensors import startDoorSensor, startMotionSensor
|
||||
from gmail import intruderAlert
|
||||
from listeners import KeypadListener, PipeListener
|
||||
|
@ -168,13 +168,7 @@ class StateMachine:
|
|||
for sig in _SIGNALS:
|
||||
setattr(self, sig.name, partial(self.selectState, sig))
|
||||
|
||||
secretTable = {
|
||||
'dynamoHum': self.DISARM,
|
||||
'zombyWoof': self.ARM,
|
||||
'imTheSlime': self.INSTANT_ARM,
|
||||
'fiftyFifty': self.LOCK,
|
||||
'dentalFloss': self.INSTANT_LOCK
|
||||
}
|
||||
secretTable = {secret: getattr(self, signal) for signal, secret in configFile['secretTable'].items()}
|
||||
|
||||
def secretCallback(secret, logger):
|
||||
if secret in secretTable:
|
||||
|
|
Loading…
Reference in New Issue