[Python-checkins] r70048 - python/branches/io-c/Lib/_pyio.py

benjamin.peterson python-checkins at python.org
Sat Feb 28 04:35:11 CET 2009


Author: benjamin.peterson
Date: Sat Feb 28 04:35:11 2009
New Revision: 70048

Log:
move code to a better place

Modified:
   python/branches/io-c/Lib/_pyio.py

Modified: python/branches/io-c/Lib/_pyio.py
==============================================================================
--- python/branches/io-c/Lib/_pyio.py	(original)
+++ python/branches/io-c/Lib/_pyio.py	Sat Feb 28 04:35:11 2009
@@ -1133,10 +1133,10 @@
         # First do the raw seek, then empty the read buffer, so that
         # if the raw seek fails, we don't lose buffered data forever.
         pos = self.raw.seek(pos, whence)
-        if pos < 0:
-            raise IOError("seek() returned invalid position")
         with self._read_lock:
             self._reset_read_buf()
+        if pos < 0:
+            raise IOError("seek() returned invalid position")
         return pos
 
     def tell(self):


More information about the Python-checkins mailing list