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
8d556b25
Commit
8d556b25
authored
Aug 05, 2009
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
properly support append-mode in RemoteFileBuffer
parent
bb78b068
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
fs/remote.py
+1
-1
fs/tests/__init__.py
+2
-0
No files found.
fs/remote.py
View file @
8d556b25
...
...
@@ -75,7 +75,7 @@ class RemoteFileBuffer(object):
self
.
_lock
=
fs
.
_lock
.
__class__
()
else
:
self
.
_lock
=
threading
.
RLock
()
if
"r"
in
mode
or
"+"
in
mode
:
if
"r"
in
mode
or
"+"
in
mode
or
"a"
in
mode
:
if
rfile
is
not
None
:
if
hasattr
(
rfile
,
"read"
):
data
=
rfile
.
read
(
1024
*
256
)
...
...
fs/tests/__init__.py
View file @
8d556b25
...
...
@@ -404,8 +404,10 @@ class FSTestCases:
f2
.
close
()
self
.
assert_
(
checkcontents
(
"b.txt"
,
test_strings
[
0
]))
f3
=
self
.
fs
.
open
(
"b.txt"
,
"ab"
)
self
.
assertEquals
(
f3
.
tell
(),
len
(
test_strings
[
0
]))
f3
.
write
(
test_strings
[
1
])
f3
.
write
(
test_strings
[
2
])
self
.
assertEquals
(
f3
.
tell
(),
len
(
all_strings
))
f3
.
close
()
self
.
assert_
(
checkcontents
(
"b.txt"
,
all_strings
))
f4
=
self
.
fs
.
open
(
"b.txt"
,
"wb"
)
...
...
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