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

Inject payload into handler decorated with @after #26

Closed
OrangeTux opened this issue Sep 23, 2019 · 0 comments
Closed

Inject payload into handler decorated with @after #26

OrangeTux opened this issue Sep 23, 2019 · 0 comments
Assignees

Comments

@OrangeTux
Copy link
Contributor

Currently methods decorated with the @after() decorated don't take any arguments.
This will change. The @after() handler will receive the same arguments as the corresponding @on() handler.

This is a backwards incompatible change. Users of ocpp <= 0.2.2 should modify there @after() handlers so that they can take arguments. Users can use *args and/or **kwargs if they don't want to use the arguments, like:

@after(Action.BootNotification)
def after_boot_notification(self, *args, **kwargs):
    pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants