Fix error where user could not create server

Fix error where user could not create support files
This commit is contained in:
amcmanu3
2022-03-14 17:39:19 -04:00
parent ddb254b9c7
commit 0f27b2df91
3 changed files with 7 additions and 4 deletions

View File

@ -162,7 +162,11 @@ class Controller:
#we'll iterate through our list of log paths from auth servers.
for server in auth_servers:
final_path = os.path.join(server_path, str(server['server_name']))
os.mkdir(final_path)
try:
os.mkdir(final_path)
except FileExistsError:
final_path += '_'+server['server_uuid']
os.mkdir(final_path)
try:
file_helper.copy_file(server['log_path'], final_path)
except Exception as e: