diff options
author | willmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f> | 2013-09-06 09:40:10 +0000 |
---|---|---|
committer | willmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f> | 2013-09-06 09:40:10 +0000 |
commit | b97366b1510e18041facf580bf6aea7dbaac5ecd (patch) | |
tree | dd1ce53d04602a76bb8781a9bb2c2c5d20038fcf /fs/iotools.py | |
parent | 2259c398fcb1e33a35c2374827b00ca3ca3d6ead (diff) | |
download | pyfilesystem-b97366b1510e18041facf580bf6aea7dbaac5ecd.tar.gz |
Replaced io.SEEK_ constants with os equivelent for 2.6 compatibility
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@864 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/iotools.py')
-rw-r--r-- | fs/iotools.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/iotools.py b/fs/iotools.py index 93b90c3..d52397e 100644 --- a/fs/iotools.py +++ b/fs/iotools.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals from __future__ import print_function +import os import io from functools import wraps @@ -35,7 +36,7 @@ class RawWrapper(object): def isatty(self): return self._f.isatty() - def seek(self, offset, whence=io.SEEK_SET): + def seek(self, offset, whence=os.SEEK_SET): return self._f.seek(offset, whence) def readable(self): @@ -52,7 +53,7 @@ class RawWrapper(object): if hasattr(self._f, 'seekable'): return self._f.seekable() try: - self.seek(0, io.SEEK_CUR) + self.seek(0, os.SEEK_CUR) except IOError: return False else: |