Skip to content

Commit ec34c04

Browse files
authored
Merge pull request #34 from SamuelM333/master
Allow kwargs in lambda handlers
2 parents 5f52954 + f876f19 commit ec34c04

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

datadog_lambda/wrapper.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def __init__(self, func):
5959

6060
def _before(self, event, context):
6161
set_cold_start()
62-
6362
try:
6463
submit_invocations_metric(context)
6564
# Extract Datadog trace context from incoming requests
@@ -77,10 +76,10 @@ def _after(self, event, context):
7776
except Exception:
7877
traceback.print_exc()
7978

80-
def __call__(self, event, context):
79+
def __call__(self, event, context, **kwargs):
8180
self._before(event, context)
8281
try:
83-
return self.func(event, context)
82+
return self.func(event, context, **kwargs)
8483
except Exception:
8584
submit_errors_metric(context)
8685
raise

scripts/run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# Unless explicitly stated otherwise all files in this repository are licensed
44
# under the Apache License Version 2.0.

0 commit comments

Comments
 (0)