diff options
author | Marcel Hellkamp <marc@gsites.de> | 2011-02-21 01:25:20 +0100 |
---|---|---|
committer | Marcel Hellkamp <marc@gsites.de> | 2011-02-21 12:54:03 +0100 |
commit | ed49a9f781664c29e980c56cd6459e9ae8f024e3 (patch) | |
tree | 52f396eaf340f2ad329cdbb231c54d27e7514a94 | |
parent | 412be338a6debb6fe195154651090a63450168bc (diff) | |
download | bottle-ed49a9f781664c29e980c56cd6459e9ae8f024e3.tar.gz |
Fix for ResetRoute path in Bottle._build_callback().
-rwxr-xr-x | bottle.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -492,7 +492,7 @@ class Bottle(object): def _build_callback(self, config): ''' Apply plugins to a route and return a new callable. ''' wrapped = config['callback'] - plugins = self.plugins + config.get('apply', []) + plugins = self.plugins + config['apply'] skip = config['skip'] try: for plugin in reversed(plugins): @@ -506,8 +506,8 @@ class Bottle(object): if not wrapped: break functools.update_wrapper(wrapped, config['callback']) return wrapped - except PluginReset: # A plugin may have changed the config dict inplace. - return self.build_handler(config) # Apply all plugins again. + except RouteReset: # A plugin may have changed the config dict inplace. + return self._build_callback(config) # Apply all plugins again. def get_url(self, routename, **kargs): """ Return a string that matches a named route """ @@ -647,7 +647,7 @@ class Bottle(object): return callback(**args) except HTTPResponse, r: return r - except PluginReset: # Route reset requested by the callback or a plugin. + except RouteReset: # Route reset requested by the callback or a plugin. del self.ccache[handle] return self.handle(environ) # Try again. except (KeyboardInterrupt, SystemExit, MemoryError): |