From 78359500fdfd7e031f5f78f33a98c2eb9b8d8e87 Mon Sep 17 00:00:00 2001 From: Marc Mance Date: Thu, 1 Aug 2024 13:29:52 -0400 Subject: [PATCH] move stat into if statement --- collect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collect.py b/collect.py index 2b73be9..f6b336d 100644 --- a/collect.py +++ b/collect.py @@ -405,9 +405,9 @@ def main(): "5s", ] - with open("gstat.csv", "a") as output_file: - # Create a Popen object with stdout redirected to the file - process = subprocess.Popen(gstat_command, stdout=output_file) + with open("gstat.csv", "a") as output_file: + # Create a Popen object with stdout redirected to the file + process = subprocess.Popen(gstat_command, stdout=output_file) collect_data(minutes)