Delete machine.txt if error "Bad Machine Id" is thrown (#116)

This commit is contained in:
rafid-dev authored and GitHub committed 2023-05-19 09:56:11 -04:00
1 parent 21de575503
commit bbd68cb789
1 file changed
+2
+2
View File
@@ -531,6 +531,8 @@ def server_configure_worker(arguments):
# 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