From 9cc5eb224602725b599adae171084c1eeb21e249 Mon Sep 17 00:00:00 2001 From: "willmcgugan@gmail.com" Date: Sun, 8 Sep 2013 11:05:47 +0000 Subject: Used SEEK_* constants from fs, rather than os git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@865 67cdc799-7952-0410-af00-57a81ceafa0f --- fs/iotools.py | 7 ++++--- 1 file 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: -- cgit v1.2.1