diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-14 18:12:54 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-14 18:12:54 +0000 |
commit | e08dd117fa687a132609328bc87666b1c814d1cc (patch) | |
tree | 4838432c16d64e2937b5271b35cbd52a65e2704b /Lib/StringIO.py | |
parent | e22997ec7c507423f597474c75d2459e5b30b063 (diff) | |
download | cpython-git-e08dd117fa687a132609328bc87666b1c814d1cc.tar.gz |
Fix a py3k warning in the StringIO module (exhibited in test_codecencodings_cn)
Diffstat (limited to 'Lib/StringIO.py')
-rw-r--r-- | Lib/StringIO.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 232009fb93..054ad4c3d5 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -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) |