diff options
author | Scott Maxwell <scott@codecobblers.com> | 2013-11-02 14:56:43 -0700 |
---|---|---|
committer | Scott Maxwell <scott@codecobblers.com> | 2013-11-02 14:56:43 -0700 |
commit | 45e65b6e1eb47944a26e4349d41998844c155df5 (patch) | |
tree | 3bc7cb1f1fcfd1d7230f71c9e083c30485f1f951 /paramiko/packet.py | |
parent | 7decda3297089b2b2e73bb9cd7e577f9b2cb2789 (diff) | |
download | paramiko-45e65b6e1eb47944a26e4349d41998844c155df5.tar.gz |
Make sftp.open handle binary and text, more type conversion
Diffstat (limited to 'paramiko/packet.py')
-rw-r--r-- | paramiko/packet.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/paramiko/packet.py b/paramiko/packet.py index 37028bb2..26521881 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -277,12 +277,12 @@ class Packetizer (object): line, so it's okay to attempt large reads. """ buf = self.__remainder - while not newline_byte in buf: + while not linefeed_byte in buf: buf += self._read_timeout(timeout) - n = buf.index(newline_byte) + n = buf.index(linefeed_byte) self.__remainder = buf[n+1:] buf = buf[:n] - if (len(buf) > 0) and (buf[-1] == cr_byte): + if (len(buf) > 0) and (buf[-1] == cr_byte_value): buf = buf[:-1] return u(buf) |