mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
This commit is contained in:
parent
e22997ec7c
commit
e08dd117fa
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue