Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
3739a44b
Commit
3739a44b
authored
Sep 06, 2013
by
willmcgugan@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced io.SEEK_ constants with os equivelent for 2.6 compatibility
parent
2a5cb8db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
fs/iotools.py
+3
-2
No files found.
fs/iotools.py
View file @
3739a44b
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
from
__future__
import
print_function
from
__future__
import
print_function
import
os
import
io
import
io
from
functools
import
wraps
from
functools
import
wraps
...
@@ -35,7 +36,7 @@ class RawWrapper(object):
...
@@ -35,7 +36,7 @@ class RawWrapper(object):
def
isatty
(
self
):
def
isatty
(
self
):
return
self
.
_f
.
isatty
()
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
)
return
self
.
_f
.
seek
(
offset
,
whence
)
def
readable
(
self
):
def
readable
(
self
):
...
@@ -52,7 +53,7 @@ class RawWrapper(object):
...
@@ -52,7 +53,7 @@ class RawWrapper(object):
if
hasattr
(
self
.
_f
,
'seekable'
):
if
hasattr
(
self
.
_f
,
'seekable'
):
return
self
.
_f
.
seekable
()
return
self
.
_f
.
seekable
()
try
:
try
:
self
.
seek
(
0
,
io
.
SEEK_CUR
)
self
.
seek
(
0
,
os
.
SEEK_CUR
)
except
IOError
:
except
IOError
:
return
False
return
False
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment