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 the sample code in the documentation #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix the sample code in the documentation
  • Loading branch information
amersaw committed Dec 6, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 78ce8aafa9a7a22bd3fc2e5ad4ba11635a82a1be
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -104,13 +104,13 @@ before/after/on_exception functionality, you can use
from lambda_decorators import LambdaDecorator

class log_everything(LambdaDecorator):
def before(event, context):
def before(self, event, context):
logging.debug(event, context)
return event, context
def after(retval):
def after(self, retval):
logging.debug(retval)
return retval
def on_exception(exception):
def on_exception(self, exception):
logging.debug(exception)
return {'statusCode': 500}

6 changes: 3 additions & 3 deletions lambda_decorators.py
Original file line number Diff line number Diff line change
@@ -105,13 +105,13 @@ def handler(event, context):
from lambda_decorators import LambdaDecorator

class log_everything(LambdaDecorator):
def before(event, context):
def before(self, event, context):
logging.debug(event, context)
return event, context
def after(retval):
def after(self, retval):
logging.debug(retval)
return retval
def on_exception(exception):
def on_exception(self, exception):
logging.debug(exception)
return {'statusCode': 500}