Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit 29e89c6

Browse files
authored
Merge pull request #16 from amersaw/fix-documentation
Fix the sample code in the documentation
2 parents 698f7dc + 78ce8aa commit 29e89c6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ before/after/on_exception functionality, you can use
104104
from lambda_decorators import LambdaDecorator
105105
106106
class log_everything(LambdaDecorator):
107-
def before(event, context):
107+
def before(self, event, context):
108108
logging.debug(event, context)
109109
return event, context
110-
def after(retval):
110+
def after(self, retval):
111111
logging.debug(retval)
112112
return retval
113-
def on_exception(exception):
113+
def on_exception(self, exception):
114114
logging.debug(exception)
115115
return {'statusCode': 500}
116116

lambda_decorators.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ def handler(event, context):
105105
from lambda_decorators import LambdaDecorator
106106
107107
class log_everything(LambdaDecorator):
108-
def before(event, context):
108+
def before(self, event, context):
109109
logging.debug(event, context)
110110
return event, context
111-
def after(retval):
111+
def after(self, retval):
112112
logging.debug(retval)
113113
return retval
114-
def on_exception(exception):
114+
def on_exception(self, exception):
115115
logging.debug(exception)
116116
return {'statusCode': 500}
117117

0 commit comments

Comments
 (0)