From 2ef7ae785bfeebccb9e4c09765f4ebf1d68c9a14 Mon Sep 17 00:00:00 2001 From: Reid Sunderland Date: Fri, 27 Sep 2024 19:13:56 +0000 Subject: [PATCH] Add back the return that was removed in 7c95a6fc07c5bb72fc9f2f8efbb1df3cad4650bc --- sarracenia/transfer/sftp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sarracenia/transfer/sftp.py b/sarracenia/transfer/sftp.py index f9150bfa8..9a9506749 100755 --- a/sarracenia/transfer/sftp.py +++ b/sarracenia/transfer/sftp.py @@ -93,6 +93,8 @@ def cd(self, path): # cd forced def cd_forced(self, path): + """ try to cd to a directory. If the cd fails, create the directory + """ logger.debug("sr_sftp cd_forced %o %s" % (self.o.permDirDefault, path)) # try to go directly to path @@ -102,6 +104,8 @@ def cd_forced(self, path): self.sftp.chdir(self.originalDir) self.sftp.chdir(path) alarm_cancel() + # cd was successful, no need to create the dir, just return + return except: pass finally: