From 90d6dfb1af823863865038cafe3c371e36156a0b Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Mon, 31 Oct 2022 13:12:43 +0100 Subject: [PATCH] feat(chalice): check for context existance for errors --- api/chalicelib/core/sourcemaps.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/chalicelib/core/sourcemaps.py b/api/chalicelib/core/sourcemaps.py index ed3c63e07..886198e35 100644 --- a/api/chalicelib/core/sourcemaps.py +++ b/api/chalicelib/core/sourcemaps.py @@ -147,12 +147,8 @@ MAX_COLUMN_OFFSET = 60 def fetch_missed_contexts(frames): source_cache = {} - print(f">>>>>>>> fetch_missed_contexts of: {len(frames)} frames") for i in range(len(frames)): - print(">>>>>>>> fetch_missed_contexts exception:") - print(frames[i]) - print("------------------") - if len(frames[i]["context"]) > 0: + if frames[i] and frames[i].get("context") and len(frames[i]["context"]) > 0: continue file_abs_path = frames[i]["frame"]["absPath"] if file_abs_path in source_cache: