Skip to content

Commit

Permalink
Update Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hujay2019 authored Dec 24, 2023
1 parent 6ae2869 commit b4172b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pysqa/ext/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ def _transfer_files(self, file_dict, sftp=None, transfer_back=False):
for file_src, file_dst in tqdm(file_dict.items()):
if transfer_back:
try:
sftp_client.stat(file_dst) # Check remote file existence
# Check remote file existence.
# If the remote file does not exist, sftp_client.get() will make the local file empty
# sftp_client.stat() can throw an exception early to prevent the execution of sftp_client.get().
sftp_client.stat(file_dst)
sftp_client.get(file_dst, file_src)
except FileNotFoundError:
pass
Expand Down

0 comments on commit b4172b7

Please sign in to comment.