mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-02 07:07:18 -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()
|
s_exit()
|
||||||
if device_type == 'c':
|
if device_type == 'c':
|
||||||
system(f"ssh -p {port} {username_ssh}@{ip} \"rm -rf '{directory_ssh}{_entry_name}.gpg'\"")
|
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
|
# program start sequence
|
||||||
|
|||||||
Reference in New Issue
Block a user