From c2a719edfa5bc6c84a69bfb5612e7fe9c03382a7 Mon Sep 17 00:00:00 2001 From: i-ky Date: Mon, 7 Mar 2022 13:27:48 +0000 Subject: [PATCH] Fix potential KeyError in merge_compdb() --- compiledb/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiledb/__init__.py b/compiledb/__init__.py index 2aab7e1..703c034 100644 --- a/compiledb/__init__.py +++ b/compiledb/__init__.py @@ -87,7 +87,7 @@ def merge_compdb(compdb, new_compdb, check_files=True): def gen_key(entry): if 'directory' in entry: return os.path.join(entry['directory'], entry['file']) - return entry['directory'] + return entry['file'] def check_file(path): return True if not check_files else os.path.exists(path)