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
09b34494
Commit
09b34494
authored
Nov 10, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OSFS.watch_inotify: add convert_os_errors wrapper
parent
1c48944a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
fs/contrib/davfs/__init__.py
+1
-1
fs/osfs/watch_inotify.py
+2
-0
fs/watch.py
+1
-1
No files found.
fs/contrib/davfs/__init__.py
View file @
09b34494
...
...
@@ -251,7 +251,7 @@ class DAVFS(FS):
if
self
.
closed
:
raise
RemoteConnectionError
(
""
,
msg
=
"FS is closed"
)
resp
=
con
.
getresponse
()
#logger.debug("DAVFS <RESP %s %s
/%s"
,method,url.hostname,url.path)
#logger.debug("DAVFS <RESP %s %s
%s/%s",resp.status
,method,url.hostname,url.path)
self
.
_cookiejar
.
extract_cookies
(
FakeResp
(
resp
),
FakeReq
(
con
,
url
.
scheme
,
url
.
path
))
except
Exception
,
e
:
self
.
_del_connection
(
con
)
...
...
fs/osfs/watch_inotify.py
View file @
09b34494
...
...
@@ -48,6 +48,7 @@ class OSFSWatchMixin(WatchableFSMixin):
finally
:
self
.
__watch_lock
.
release
()
@convert_os_errors
def
add_watcher
(
self
,
callback
,
path
=
"/"
,
events
=
None
,
recursive
=
True
):
super_add_watcher
=
super
(
OSFSWatchMixin
,
self
)
.
add_watcher
w
=
super_add_watcher
(
callback
,
path
,
events
,
recursive
)
...
...
@@ -79,6 +80,7 @@ class OSFSWatchMixin(WatchableFSMixin):
self
.
__watch_lock
.
release
()
return
w
@convert_os_errors
def
del_watcher
(
self
,
watcher_or_callback
):
if
isinstance
(
watcher_or_callback
,
Watcher
):
watchers
=
[
watcher_or_callback
]
...
...
fs/watch.py
View file @
09b34494
...
...
@@ -10,7 +10,7 @@ simulate such an ability on top of an ordinary FS object.
An FS object that wants to be "watchable" must provide the following methods:
* add_watcher(
path,callback
,events=None,recursive=True)
* add_watcher(
callback,path="/"
,events=None,recursive=True)
Request that the given callback be executed in response to changes
to the given path. A specific set of change events can be specified.
...
...
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