handle missing ovpn file at end of script run
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user