From cb57abd6911f7e2c2820166d03ecdb10809e1a1f Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Tue, 6 Jul 2010 09:00:24 -0400 Subject: [PATCH] Eliminate the "controllers" attribute from RouteFS classes. At some point, Routes outgrew needing to be told a list of controllers. --- routefs/__init__.py | 8 +------- routefs/dictfs.py | 2 -- routefs/examples/homefs.py | 1 - routefs/examples/pyhesiodfs.py | 1 - 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/routefs/__init__.py b/routefs/__init__.py index 294ec93..6a8d374 100644 --- a/routefs/__init__.py +++ b/routefs/__init__.py @@ -39,17 +39,11 @@ class RouteStat(fuse.Stat): class RouteFS(fuse.Fuse): """ RouteFS: Web 2.0 for filesystems - - Any method that will be used as the controller in a Routes mapping - (either by explicitly specifying the controller or by using the - ':controller' variable) must be added to RouteFS.controllers """ - controllers = [] def __init__(self, *args, **kwargs): super(RouteFS, self).__init__(*args, **kwargs) self.map = self.make_map() - self.map.create_regs(self.controllers) def make_map(self): """ @@ -58,7 +52,7 @@ class RouteFS(fuse.Fuse): """ m = routes.Mapper() - m.connect(':controller') + m.connect('{controller}') return m diff --git a/routefs/dictfs.py b/routefs/dictfs.py index 9226c70..00deae9 100644 --- a/routefs/dictfs.py +++ b/routefs/dictfs.py @@ -19,8 +19,6 @@ import routefs class DictFS(routefs.RouteFS): - controllers = ['handler'] - @property def files(self): """ diff --git a/routefs/examples/homefs.py b/routefs/examples/homefs.py index 16c7bda..701c1c4 100755 --- a/routefs/examples/homefs.py +++ b/routefs/examples/homefs.py @@ -17,7 +17,6 @@ import routefs class HomeFS(routefs.RouteFS): - controllers = ['getList', 'getUser'] def __init__(self, *args, **kwargs): super(HomeFS, self).__init__(*args, **kwargs) self.cache = {} diff --git a/routefs/examples/pyhesiodfs.py b/routefs/examples/pyhesiodfs.py index b3daa84..4d41852 100755 --- a/routefs/examples/pyhesiodfs.py +++ b/routefs/examples/pyhesiodfs.py @@ -8,7 +8,6 @@ import routefs class PyHesiodFS(routefs.RouteFS): - controllers = ['getList', 'getReadme', 'getLocker'] def __init__(self, *args, **kwargs): super(PyHesiodFS, self).__init__(*args, **kwargs) self.fuse_args.add("allow_other", True) -- 1.7.9.5