]> granicus.if.org Git - python/commitdiff
Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 14 Oct 2009 18:12:54 +0000 (18:12 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 14 Oct 2009 18:12:54 +0000 (18:12 +0000)
Lib/StringIO.py

index 232009fb9397e27d9b1465c28ee5f24e583c5943..054ad4c3d585c2809cfa76ed177dad378bd5039e 100644 (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)