mirror of https://github.com/python/cpython.git
Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
This commit is contained in:
parent
e22997ec7c
commit
e08dd117fa
|
@ -128,7 +128,7 @@ def read(self, n = -1):
|
||||||
if self.buflist:
|
if self.buflist:
|
||||||
self.buf += ''.join(self.buflist)
|
self.buf += ''.join(self.buflist)
|
||||||
self.buflist = []
|
self.buflist = []
|
||||||
if n < 0:
|
if n is None or n < 0:
|
||||||
newpos = self.len
|
newpos = self.len
|
||||||
else:
|
else:
|
||||||
newpos = min(self.pos+n, self.len)
|
newpos = min(self.pos+n, self.len)
|
||||||
|
|
Loading…
Reference in New Issue