From e71e768e4fb589e78f780436b469f09c2f9f2232 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 3 Feb 2023 06:47:37 -0700 Subject: [PATCH] Formatting --- frigate/util.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frigate/util.py b/frigate/util.py index d3597be06..5d0858170 100755 --- a/frigate/util.py +++ b/frigate/util.py @@ -926,9 +926,15 @@ def get_nvidia_gpu_stats() -> dict[str, str]: "--format=csv", ] - if "CUDA_VISIBLE_DEVICES" in os.environ and os.environ["CUDA_VISIBLE_DEVICES"].isdigit(): + if ( + "CUDA_VISIBLE_DEVICES" in os.environ + and os.environ["CUDA_VISIBLE_DEVICES"].isdigit() + ): nvidia_smi_command.extend(["--id", os.environ['CUDA_VISIBLE_DEVICES']]) - elif "NVIDIA_VISIBLE_DEVICES" in os.environ and os.environ["NVIDIA_VISIBLE_DEVICES"].isdigit(): + elif ( + "NVIDIA_VISIBLE_DEVICES" in os.environ + and os.environ["NVIDIA_VISIBLE_DEVICES"].isdigit() + ): nvidia_smi_command.extend(["--id", os.environ['NVIDIA_VISIBLE_DEVICES']]) p = sp.run(