From dfecdc921305cf7b5274c26c0a218ad777f3069d Mon Sep 17 00:00:00 2001 From: Andrew Perry Date: Fri, 14 Feb 2020 14:54:42 +1100 Subject: [PATCH] [sftp] Fix to allow connection exceptions to be raised (#835) --- AUTHORS | 1 + storages/backends/sftpstorage.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 464313f38..7679f2404 100644 --- a/AUTHORS +++ b/AUTHORS @@ -40,6 +40,7 @@ By order of apparition, thanks: * Martey Dodoo * Chris Rink * Shaung Cheng (S3 docs) + * Andrew Perry (Bug fixes in SFTPStorage) Extra thanks to Marty for adding this in Django, diff --git a/storages/backends/sftpstorage.py b/storages/backends/sftpstorage.py index 9757e69aa..920f593b2 100644 --- a/storages/backends/sftpstorage.py +++ b/storages/backends/sftpstorage.py @@ -78,8 +78,6 @@ def _connect(self): self._connect() else: raise paramiko.AuthenticationException(e) - except Exception as e: - print(e) if self._ssh.get_transport(): self._sftp = self._ssh.open_sftp()