bottlepy / bottle-redis

27 stars 3 forks source link

fix wrong callback call in apply #5

Closed e1ty closed 9 years ago

e1ty commented 9 years ago

callback - wrapped with plugins function _callback - initial function

avelino commented 9 years ago

Use the "_ callback" to support the old version of the plugin bottle! https://github.com/bottlepy/bottle-redis/blob/master/bottle_redis.py#L32

e1ty commented 9 years ago

If you call _callback you call initial function, so other plugins won't work.

Plugins wrapp initial function at https://github.com/bottlepy/bottle/blob/master/bottle.py#L530 or in 0.9ver https://github.com/bottlepy/bottle/blob/release-0.9/bottle.py#L531

So when bottle_redis is wrapping callback function, it returns initial function

avelino commented 9 years ago

You can write a test covering this error?