From 9d94ba1eb9a92a60082b8fa85f094aad6beb3243 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Tue, 20 Jun 2023 14:35:59 -0400 Subject: [PATCH] Removed unnecessary output when shearing a non-existent entry Former-commit-id: 7c264de0ebf49889e309d43d1ad5a7483845308e Former-commit-id: 84c4c04e1bd4b085b457ddbd8184c9c3b028dcd1 --- lib/sshync.py | 4 ++++ lib/sshyp.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/sshync.py b/lib/sshync.py index 7d600d3..d0d2058 100644 --- a/lib/sshync.py +++ b/lib/sshync.py @@ -84,11 +84,15 @@ def remote_list_fetch(_user_data): # checks for and acts upon files and folders marked for deletion def deletion_sync(_deletion_database, _silent): + _synced = False for _file in _deletion_database: if _file != '': if not _silent: + _synced = True print(f"\u001b[38;5;208m{_file}\u001b[0m has been sheared, removing...") delete(_file, 'locally', _silent) + if _synced: + print() # creates matches of remote folders on the local client diff --git a/lib/sshyp.py b/lib/sshyp.py index ae14ffd..55c1138 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -570,7 +570,7 @@ def remove_data(): decrypt(None, _quick_verify=quick_unlock_enabled) if not ssh_error: run(('ssh', '-i', f"{home}/.ssh/sshyp", '-p', port, f"{username_ssh}@{ip}", - f'cd /usr/lib/sshyp; python3 -c \'from sshync import delete; delete("{entry_name}", "remotely", False)\'')) + f'cd /usr/lib/sshyp; python3 -c \'from sshync import delete; delete("{entry_name}", "remotely", True)\'')) else: offline_delete(entry_name, 'locally', silent_sync)