commit | e08dd117fa687a132609328bc87666b1c814d1cc | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Wed Oct 14 18:12:54 2009 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Wed Oct 14 18:12:54 2009 +0000 |
tree | 4838432c16d64e2937b5271b35cbd52a65e2704b | |
parent | e22997ec7c507423f597474c75d2459e5b30b063 [diff] [blame] |
Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 232009f..054ad4c 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py
@@ -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)