From 46f77e02adaf26b0024c7d7ffcb0978700f1a689 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 13 Aug 2023 09:17:55 -0400 Subject: [PATCH] added file close --- rpitx.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpitx.py b/rpitx.py index faf8b4bc..95af7d2d 100644 --- a/rpitx.py +++ b/rpitx.py @@ -578,7 +578,10 @@ if __name__ == "__main__": try: command_count += 1 filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - string = filec.write(str(command_count)) + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() except: if (debug_mode == 1): print("Can't write command_count file!")