diff options
Diffstat (limited to 'presence.py')
| -rw-r--r-- | presence.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/presence.py b/presence.py index b6e9fc3..682855d 100644 --- a/presence.py +++ b/presence.py @@ -9,8 +9,6 @@ from typing import Dict, List import argparse_utils import config -import dict_utils -import exec_utils logger = logging.getLogger(__name__) @@ -83,9 +81,10 @@ class PresenceDetection(object): self.update() def update(self) -> None: + from exec_utils import cmd persisted_macs = config.config['presence_macs_file'] self.read_persisted_macs_file(persisted_macs, Location.HOUSE) - raw = exec_utils.cmd( + raw = cmd( "ssh [email protected] 'cat /home/scott/cron/persisted_mac_addresses.txt'" ) self.parse_raw_macs_file(raw, Location.CABIN) @@ -142,6 +141,8 @@ class PresenceDetection(object): return False def where_is_person_now(self, name: Person) -> Location: + import dict_utils + if name is Person.UNKNOWN: if self.weird_mac_at_cabin: return Location.CABIN |
