Commit e08dd117 authored by Antoine Pitrou's avatar Antoine Pitrou

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

parent e22997ec
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment