Skip to content

Commit

Permalink
password-pattern needs to be bytes
Browse files Browse the repository at this point in the history
for pexpect, even though it should be str
  • Loading branch information
minrk committed Nov 30, 2015
1 parent 4987f9f commit c5724bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zmq/ssh/tunnel.py
Expand Up @@ -37,6 +37,8 @@ class SSHException(Exception):
except ImportError:
pexpect = None

from ..utils.strtypes import b


_random_ports = set()

Expand All @@ -62,7 +64,7 @@ def select_random_ports(n):
#-----------------------------------------------------------------------------
# Check for passwordless login
#-----------------------------------------------------------------------------
_password_pat = re.compile(r'pass(word|phrase):', re.IGNORECASE)
_password_pat = re.compile(b(r'pass(word|phrase):'), re.IGNORECASE)

def try_passwordless_ssh(server, keyfile, paramiko=None):
"""Attempt to make an ssh connection without a password.
Expand Down

0 comments on commit c5724bb

Please sign in to comment.