File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ def parse_event_source(event):
39
39
api-gateway | application-load-balancer | cloudwatch-logs |
40
40
cloudwatch-events | cloudfront | dynamodb | kinesis | s3 | sns | sqs
41
41
"""
42
+ if type (event ) is not dict :
43
+ return
42
44
event_source = event .get ("eventSource" ) or event .get ("EventSource" )
43
45
44
46
request_context = event .get ("requestContext" )
Original file line number Diff line number Diff line change @@ -330,6 +330,12 @@ def test_extract_trigger_tags_unsupported(self):
330
330
tags = extract_trigger_tags (event , ctx )
331
331
self .assertEqual (tags , {})
332
332
333
+ def test_extract_trigger_tags_list_type_event (self ):
334
+ event = []
335
+ ctx = get_mock_context ()
336
+ tags = extract_trigger_tags (event , ctx )
337
+ self .assertEqual (tags , {})
338
+
333
339
334
340
class ExtractHTTPStatusCodeTag (unittest .TestCase ):
335
341
def test_extract_http_status_code_tag_from_response_dict (self ):
You can’t perform that action at this time.
0 commit comments