X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=smart_home%2Fregistry.py;fp=smart_home%2Fregistry.py;h=75fe05256cc9f51cdc06a497fe9304917a510218;hb=55a3172e37855f388b9ba0dfc91641a6c9ad1376;hp=20fb3f43807bf0dbbd45fa7f5c36ed8f4d1bc917;hpb=ffc4022c1ea2c2a5892150ff55e6c9a9ddbb8756;p=python_utils.git diff --git a/smart_home/registry.py b/smart_home/registry.py index 20fb3f4..75fe052 100644 --- a/smart_home/registry.py +++ b/smart_home/registry.py @@ -3,7 +3,6 @@ import logging import re from typing import List, Optional, Set -import warnings import argparse_utils import config @@ -64,9 +63,8 @@ class SmartHomeRegistry(object): try: (mac, name, keywords) = line.split(",") except ValueError: - msg = f'SH-CONFIG> {line} is malformed?!' + msg = f'SH-CONFIG> "{line}" is malformed?! Skipping it.' logger.warning(msg) - warnings.warn(msg) continue mac = mac.strip() name = name.strip() @@ -190,7 +188,6 @@ class SmartHomeRegistry(object): return device.Device(name, mac, kws) msg = f'{mac} is not a known smart home device, returning None' logger.warning(msg) - warnings.warn(msg) return None def query(self, query: str) -> List[device.Device]: