Browse Source

Handle SSHException

pull/851/head
Andrea 8 years ago
committed by Jairo Llopis
parent
commit
75f53137bc
  1. 4
      auto_backup/models/db_backup.py

4
auto_backup/models/db_backup.py

@ -126,7 +126,9 @@ class DbBackup(models.Model):
# Just open and close the connection # Just open and close the connection
with self.sftp_connection(): with self.sftp_connection():
raise exceptions.Warning(_("Connection Test Succeeded!")) raise exceptions.Warning(_("Connection Test Succeeded!"))
except (pysftp.CredentialException, pysftp.ConnectionException):
except (pysftp.CredentialException,
pysftp.ConnectionException,
pysftp.SSHException):
_logger.info("Connection Test Failed!", exc_info=True) _logger.info("Connection Test Failed!", exc_info=True)
raise exceptions.Warning(_("Connection Test Failed!")) raise exceptions.Warning(_("Connection Test Failed!"))

Loading…
Cancel
Save