summaryrefslogtreecommitdiff
path: root/paramiko/file.py
diff options
context:
space:
mode:
authorachapp <adamdchappell@gmail.com>2014-11-24 18:08:26 -0600
committerJeff Forcier <jeff@bitprophet.org>2014-12-17 15:51:19 -0800
commit34c4d0c4a29c8b3c26925c2a05a9b0e50a83f617 (patch)
treee966695812f921bd4dc2d5242dc71f49f8449406 /paramiko/file.py
parentb3ed2d5b7eef96a349809517e2d782fca3906e94 (diff)
downloadparamiko-34c4d0c4a29c8b3c26925c2a05a9b0e50a83f617.tar.gz
Test update/Fix progress temp save
Edited test to catch readline error. file.py code change in progress (DOES NOT WORK PROPERLY) so saving it temporarily.
Diffstat (limited to 'paramiko/file.py')
-rw-r--r--paramiko/file.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/paramiko/file.py b/paramiko/file.py
index 0a7fbcba..139c453b 100644
--- a/paramiko/file.py
+++ b/paramiko/file.py
@@ -221,8 +221,8 @@ class BufferedFile (object):
# truncate line and return
self._rbuffer = line[size:]
line = line[:size]
- self._pos += len(line)
- return line if self._flags & self.FLAG_BINARY else u(line)
+ #self._pos += len(line)
+ break#return line if self._flags & self.FLAG_BINARY else u(line)
n = size - len(line)
else:
n = self._bufsize
@@ -244,6 +244,11 @@ class BufferedFile (object):
rpos = line.find(cr_byte)
if (rpos >= 0) and (rpos < pos or pos < 0):
pos = rpos
+ if pos == -1:
+ #self._rbuffer = line[size:]
+ #line = line[:size]
+ self._pos += len(line)
+ return line if self._flags & self.FLAG_BINARY else u(line)
xpos = pos + 1
if (line[pos] == cr_byte_value) and (xpos < len(line)) and (line[xpos] == linefeed_byte_value):
xpos += 1