diff options
author | willmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f> | 2013-09-08 11:05:47 +0000 |
---|---|---|
committer | willmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f> | 2013-09-08 11:05:47 +0000 |
commit | 9cc5eb224602725b599adae171084c1eeb21e249 (patch) | |
tree | a8fd2b818f578322b5f90f28f1c97607bc15445d | |
parent | b97366b1510e18041facf580bf6aea7dbaac5ecd (diff) | |
download | pyfilesystem-9cc5eb224602725b599adae171084c1eeb21e249.tar.gz |
Used SEEK_* constants from fs, rather than os
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@865 67cdc799-7952-0410-af00-57a81ceafa0f
-rw-r--r-- | fs/iotools.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/iotools.py b/fs/iotools.py index d52397e..ce243c1 100644 --- a/fs/iotools.py +++ b/fs/iotools.py @@ -1,7 +1,8 @@ from __future__ import unicode_literals from __future__ import print_function -import os +from fs import SEEK_SET, SEEK_CUR, SEEK_END + import io from functools import wraps @@ -36,7 +37,7 @@ class RawWrapper(object): def isatty(self): return self._f.isatty() - def seek(self, offset, whence=os.SEEK_SET): + def seek(self, offset, whence=SEEK_SET): return self._f.seek(offset, whence) def readable(self): @@ -53,7 +54,7 @@ class RawWrapper(object): if hasattr(self._f, 'seekable'): return self._f.seekable() try: - self.seek(0, os.SEEK_CUR) + self.seek(0, SEEK_CUR) except IOError: return False else: |