X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=smart_home%2Fregistry.py;h=ae57a735794e07723311685ca994d0a5f936d258;hb=b29be4f1750fd20bd2eada88e751dfae85817882;hp=2d23981d00ad9aaafef04a45c0761bd4cdefd5af;hpb=eb9e6df32ed696158bf34dba6464277b648f5c74;p=python_utils.git diff --git a/smart_home/registry.py b/smart_home/registry.py index 2d23981..ae57a73 100644 --- a/smart_home/registry.py +++ b/smart_home/registry.py @@ -60,7 +60,11 @@ class SmartHomeRegistry(object): if line == "": continue logger.debug(f'SH-CONFIG> {line}') - (mac, name, keywords) = line.split(",") + try: + (mac, name, keywords) = line.split(",") + except ValueError: + logger.warning(f'SH-CONFIG> {line} is malformed?!') + continue mac = mac.strip() name = name.strip() keywords = keywords.strip()