Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sshtunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ def _consolidate_auth(ssh_password=None,
if isinstance(ssh_pkey, paramiko.pkey.PKey):
ssh_loaded_pkeys.insert(0, ssh_pkey)

if not ssh_password and not ssh_loaded_pkeys:
if ssh_password is None and not ssh_loaded_pkeys:
raise ValueError('No password or public key available!')
return (ssh_password, ssh_loaded_pkeys)

Expand Down Expand Up @@ -1410,7 +1410,7 @@ def _connect_to_gateway(self):
self.logger.debug('Authentication error')
self._stop_transport()

if self.ssh_password: # avoid conflict using both pass and pkey
if self.ssh_password is not None: # avoid conflict using both pass and pkey
self.logger.debug('Trying to log in with password: {0}'
.format('*' * len(self.ssh_password)))
try:
Expand Down