From 43c07db7720e0d554d530851b8a4f7591ae34323 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 8 Aug 2024 17:20:07 -0400 Subject: [PATCH] Fix reading an empty machine id file --- Client/worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client/worker.py b/Client/worker.py index 1ee3dcf..86b1f6c 100644 --- a/Client/worker.py +++ b/Client/worker.py @@ -214,7 +214,8 @@ class Configuration: if os.path.isfile('machine.txt'): with open('machine.txt') as fin: - self.machine_id = fin.readlines()[0] + for line in fin.readlines(): + machine_id = line.rstrip(); break class ServerReporter: