diff Lib/StringIO.py @ 56520:e8532cc8a14e legacy-trunk

Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
author Antoine Pitrou <solipsis@pitrou.net>
date Wed, 14 Oct 2009 18:12:54 +0000
parents 7f76996c7bf4
children 215ddff199c1
line wrap: on
line diff
--- a/Lib/StringIO.py	Wed Oct 14 18:09:45 2009 +0000
+++ b/Lib/StringIO.py	Wed Oct 14 18:12:54 2009 +0000
@@ -128,7 +128,7 @@
         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)