Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong callback call in apply #5

Merged
merged 1 commit into from
Feb 5, 2015
Merged

Conversation

e1ty
Copy link
Contributor

@e1ty e1ty commented Dec 18, 2014

callback - wrapped with plugins function
_callback - initial function

`callback` - wrapped with plugins function
`_callback` - initial function
@avelino
Copy link
Member

avelino commented Dec 18, 2014

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
Copy link
Contributor Author

e1ty commented Dec 18, 2014

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
Copy link
Member

avelino commented Dec 18, 2014

You can write a test covering this error?

avelino pushed a commit that referenced this pull request Feb 5, 2015
fix wrong callback call in apply
@avelino avelino merged commit 534fb02 into bottlepy:master Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants