summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott <[email protected]>2022-01-26 21:18:33 -0800
committerScott <[email protected]>2022-01-26 21:18:33 -0800
commitbb3ebebb1a2458fa52b042b35d8e5fbad408ff80 (patch)
tree1518ae0510b001e5d5acaf6766aa222931a270e9
parent26aeb26a54ef46a06a84d6c62492ebca318c5263 (diff)
Fix missing f's.
-rw-r--r--arper.py2
-rwxr-xr-xbase_presence.py2
-rw-r--r--camera_utils.py2
-rw-r--r--logging_utils.py4
4 files changed, 5 insertions, 5 deletions
diff --git a/arper.py b/arper.py
index a4e8d3e..696bf97 100644
--- a/arper.py
+++ b/arper.py
@@ -60,7 +60,7 @@ class Arper(persistent.Persistent):
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
diff --git a/base_presence.py b/base_presence.py
index 405b743..94c5e2f 100755
--- a/base_presence.py
+++ b/base_presence.py
@@ -161,7 +161,7 @@ class PresenceDetection(object):
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(",")
diff --git a/camera_utils.py b/camera_utils.py
index 66ef6ac..204a337 100644
--- a/camera_utils.py
+++ b/camera_utils.py
@@ -150,7 +150,7 @@ def fetch_camera_image_from_rtsp_stream(
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
diff --git a/logging_utils.py b/logging_utils.py
index c04d76d..2b39767 100644
--- a/logging_utils.py
+++ b/logging_utils.py
@@ -228,7 +228,7 @@ class DynamicPerScopeLoggingLevelFilter(logging.Filter):
None
)
if not isinstance(numeric_level, int):
- raise ValueError('Invalid level: {name}')
+ raise ValueError(f'Invalid level: {name}')
return numeric_level
def __init__(
@@ -539,7 +539,7 @@ def initialize_logging(logger=None) -> logging.Logger:
)
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)')