From 329a955042025f6cab76c45576d4a03577f7d471 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 19 May 2023 09:58:01 -0400 Subject: [PATCH] Style and remove ./ prefix --- Client/Client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Client/Client.py b/Client/Client.py index da93550..3c836bc 100644 --- a/Client/Client.py +++ b/Client/Client.py @@ -528,11 +528,13 @@ def server_configure_worker(arguments): target = url_join(arguments.server, 'clientWorkerInfo') response = requests.post(target, data=payload, timeout=TIMEOUT_HTTP).json() + # Delete the machine.txt if we have saved an invalid machine number + if 'error' in response and response['error'].lower() == "bad machine id": + os.remove('machine.txt') + # The 'error' header is included if there was an issue if 'error' in response: print('[Error] %s\n' % (response['error'])) - if (response['error'].lower() == "bad machine id"): - os.remove('./machine.txt') sys.exit() # Save the machine id, to avoid re-registering every time