Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)

This commit is contained in:
Antoine Pitrou 2009-10-14 18:12:54 +00:00
parent e22997ec7c
commit e08dd117fa
1 changed files with 1 additions and 1 deletions

View File

@ -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)