handle missing ovpn file at end of script run

This commit is contained in:
2024-11-01 22:55:38 -05:00
parent 9b65844a6a
commit 309e152ef9

View File

@@ -183,7 +183,10 @@ for index, server in enumerate(servers):
print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: Resuming...") print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: Resuming...")
# Clean up the temporary OVPN file # Clean up the temporary OVPN file
try:
os.remove(ovpn_filepath) os.remove(ovpn_filepath)
except FileNotFoundError:
print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: Warning: OVPN file not found for deletion: {ovpn_filepath}")
# Close the database connection # Close the database connection
cursor.close() cursor.close()