[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-78]
fix rbuffer -> _rbuffer in 3 places i missed fix 3 places where "rbuffer" hadn't been converted to "_rbuffer". thanks to kevin c. dorff for the bug report.
This commit is contained in:
parent
ff6ff88209
commit
caa1f88105
|
@ -121,8 +121,8 @@ class BufferedFile (object):
|
||||||
raise IOError('File not open for reading')
|
raise IOError('File not open for reading')
|
||||||
if (size is None) or (size < 0):
|
if (size is None) or (size < 0):
|
||||||
# go for broke
|
# go for broke
|
||||||
result = self.rbuffer
|
result = self._rbuffer
|
||||||
self.rbuffer = ''
|
self._rbuffer = ''
|
||||||
self._pos += len(result)
|
self._pos += len(result)
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
|
@ -191,7 +191,7 @@ class BufferedFile (object):
|
||||||
if (size is not None) and (size >= 0):
|
if (size is not None) and (size >= 0):
|
||||||
if len(line) >= size:
|
if len(line) >= size:
|
||||||
# truncate line and return
|
# truncate line and return
|
||||||
self.rbuffer = line[size:]
|
self._rbuffer = line[size:]
|
||||||
line = line[:size]
|
line = line[:size]
|
||||||
self._pos += len(line)
|
self._pos += len(line)
|
||||||
return line
|
return line
|
||||||
|
|
Loading…
Reference in New Issue