self.update_from_arp_scan()
self.update_from_arp()
if len(self.state) < config.config['arper_min_entries_to_be_valid']:
- raise Exception('Arper didn\'t find enough entries; only got {len(self.state)}.')
+ raise Exception(f'Arper didn\'t find enough entries; only got {len(self.state)}.')
def update_from_arp_scan(self):
network_spec = site_config.get_config().network
if "cabin_" in line:
continue
if location == Location.CABIN:
- logger.debug('Cabin count: {cabin_count}')
+ logger.debug(f'Cabin count: {cabin_count}')
cabin_count += 1
try:
(mac, count, ip_name, mfg, ts) = line.split(",")
return out
except Exception as e:
logger.exception(e)
- msg = "Failed to retrieve image via RTSP {stream}, returning None."
+ msg = f"Failed to retrieve image via RTSP {stream}, returning None."
logger.warning(msg)
warnings.warn(msg, stacklevel=2)
return None
None
)
if not isinstance(numeric_level, int):
- raise ValueError('Invalid level: {name}')
+ raise ValueError(f'Invalid level: {name}')
return numeric_level
def __init__(
)
if config.config['lmodule']:
logger.debug(
- 'Logging dynamic per-module logging enabled (--lmodule={config.config["lmodule"]})'
+ f'Logging dynamic per-module logging enabled (--lmodule={config.config["lmodule"]})'
)
if config.config['logging_captures_prints']:
logger.debug('Logging will capture printed data as logger.info messages (--logging_captures_prints)')