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...")
|
||||
|
||||
# Clean up the temporary OVPN file
|
||||
os.remove(ovpn_filepath)
|
||||
try:
|
||||
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
|
||||
cursor.close()
|
||||
|
||||
Reference in New Issue
Block a user