From e655b0b5c616a5e0732e68c2e2578f02ae4c84c5 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 12 Aug 2008 00:30:52 -0700 Subject: [PATCH] Automatically convert strs and lists to Files and Directories --- routefs/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routefs/__init__.py b/routefs/__init__.py index 9e2c6cc..5137256 100644 --- 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): -- 1.7.9.5