mirror of https://github.com/python/cpython
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 @@ class StringIO:
|
|||
if self.buflist:
|
||||
self.buf += ''.join(self.buflist)
|
||||
self.buflist = []
|
||||
if n < 0:
|
||||
if n is None or n < 0:
|
||||
newpos = self.len
|
||||
else:
|
||||
newpos = min(self.pos+n, self.len)
|
||||
|
|
Loading…
Reference in New Issue