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
7465c77a
Commit
7465c77a
authored
Sep 09, 2013
by
willmcgugan@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for setcontents with empty string
parent
1d6b1906
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
fs/base.py
+1
-1
fs/tests/__init__.py
+2
-0
No files found.
fs/base.py
View file @
7465c77a
...
@@ -790,7 +790,7 @@ class FS(object):
...
@@ -790,7 +790,7 @@ class FS(object):
if
not
data
:
if
not
data
:
progress_callback
(
0
)
progress_callback
(
0
)
self
.
createfile
(
path
)
self
.
createfile
(
path
,
wipe
=
True
)
finished_callback
()
finished_callback
()
return
0
return
0
...
...
fs/tests/__init__.py
View file @
7465c77a
...
@@ -152,6 +152,8 @@ class FSTestCases(object):
...
@@ -152,6 +152,8 @@ class FSTestCases(object):
b
(
"to you, good sir!"
)),
chunk_size
=
2
)
b
(
"to you, good sir!"
)),
chunk_size
=
2
)
self
.
assertEquals
(
self
.
fs
.
getcontents
(
self
.
assertEquals
(
self
.
fs
.
getcontents
(
"hello"
,
"rb"
),
b
(
"to you, good sir!"
))
"hello"
,
"rb"
),
b
(
"to you, good sir!"
))
self
.
fs
.
setcontents
(
"hello"
,
""
,
"wb"
)
self
.
assertEquals
(
self
.
fs
.
getcontents
(
"hello"
,
"rb"
),
""
)
def
test_setcontents_async
(
self
):
def
test_setcontents_async
(
self
):
# setcontents() should accept both a string...
# setcontents() should accept both a string...
...
...
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