Fix missing f's.
authorScott <[email protected]>
Thu, 27 Jan 2022 05:18:33 +0000 (21:18 -0800)
committerScott <[email protected]>
Thu, 27 Jan 2022 05:18:33 +0000 (21:18 -0800)
arper.py
base_presence.py
camera_utils.py
logging_utils.py

index a4e8d3e1196a1f683a24a9d43f4ec48fc8890253..696bf97204c02fe8b9cbbf49463a160575348e19 100644 (file)
--- 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
index 405b743f90e33a85394528403f06bce71d153cc8..94c5e2f0b2ecbcf278df0c7ed09bf357286242f3 100755 (executable)
@@ -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(",")
index 66ef6ac8e4d77f76f1775569f808f1ab57839176..204a3374a78e3521daba62447644b39ea67b7bc5 100644 (file)
@@ -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
index c04d76d610708b5ff731c9ca4cd5a4f988c35867..2b3976758b1bb6d81f775fca97d9b6ea0df8fe93 100644 (file)
@@ -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)')