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):
3939 api-gateway | application-load-balancer | cloudwatch-logs |
4040 cloudwatch-events | cloudfront | dynamodb | kinesis | s3 | sns | sqs
4141 """
42+ if type (event ) is not dict :
43+ return
4244 event_source = event .get ("eventSource" ) or event .get ("EventSource" )
4345
4446 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):
330330 tags = extract_trigger_tags (event , ctx )
331331 self .assertEqual (tags , {})
332332
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+
333339
334340class ExtractHTTPStatusCodeTag (unittest .TestCase ):
335341 def test_extract_http_status_code_tag_from_response_dict (self ):
You can’t perform that action at this time.
0 commit comments