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

Eve app object is swallowing all AttributeErrors? #14

Open
kallqvist opened this issue May 24, 2019 · 1 comment
Open

Eve app object is swallowing all AttributeErrors? #14

kallqvist opened this issue May 24, 2019 · 1 comment

Comments

@kallqvist
Copy link

Expected Behavior

I expect calling any non existing method will raise an Exception.
Flask do this, Eve does not.
Is this a bug or is the change in behaviour in Eve intended for some reason?

# This works as expected:
>>> from flask import Flask
>>> a=Flask('a')
>>> a.doesnotexist()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Flask' object has no attribute 'doesnotexist'

# This does not:
>>> from eve import Eve
>>> b=Eve(settings={'DOMAIN':{}})
>>> b.doesnotexist()
>>> 

Actual Behavior

Nothing happens at all, method call silently fails only returning None

Environment

  • Python version:
    Python 3.6.7

  • Eve version:
    Eve==0.9.1

@nicolaiarocci nicolaiarocci transferred this issue from pyeve/eve May 27, 2019
@nicolaiarocci
Copy link
Member

Hi, at first glance this is due to Events, which adds supports for attaching callback functions to events. Moving the ticket to the events repository.

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

No branches or pull requests

2 participants