projects
/
invirt/packages/python-routefs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4909cd3
)
Automatically convert strs and lists to Files and Directories
author
Evan Broder
<broder@mit.edu>
Tue, 12 Aug 2008 07:30:52 +0000
(
00:30
-0700)
committer
Evan Broder
<broder@mit.edu>
Tue, 12 Aug 2008 07:30:52 +0000
(
00:30
-0700)
routefs/__init__.py
patch
|
blob
|
history
diff --git
a/routefs/__init__.py
b/routefs/__init__.py
index
9e2c6cc
..
5137256
100644
(file)
--- a/
routefs/__init__.py
+++ b/
routefs/__init__.py
@@
-86,6
+86,10
@@
class RouteFS(fuse.Fuse):
return
controller = match.pop('controller')
result = getattr(self, controller)(**match)
+ if type(result) is str:
+ result = File(result)
+ if type(result) is list:
+ result = Directory(result)
return result
def readdir(self, path, offset):