From b97366b1510e18041facf580bf6aea7dbaac5ecd Mon Sep 17 00:00:00 2001 From: "willmcgugan@gmail.com" Date: Fri, 6 Sep 2013 09:40:10 +0000 Subject: 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 --- fs/iotools.py | 5 +++-- 1 file 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: -- cgit v1.2.1