mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 21:06:34 -04:00
Added exception when trying to shear a file that doesn't exist
This commit is contained in:
@@ -384,7 +384,11 @@ def remove_data(): # deletes an entry or folder from both the client and the se
|
||||
s_exit()
|
||||
if device_type == 'c':
|
||||
system(f"ssh -p {port} {username_ssh}@{ip} \"rm -rf '{directory_ssh}{_entry_name}.gpg'\"")
|
||||
remove(f"{directory}{_entry_name}.gpg")
|
||||
try:
|
||||
remove(f"{directory}{_entry_name}.gpg")
|
||||
except FileNotFoundError:
|
||||
print("\nThe file does not exist!\n")
|
||||
s_exit()
|
||||
|
||||
|
||||
# program start sequence
|
||||
|
||||
Reference in New Issue
Block a user