compiledb
compiledb copied to clipboard
Fix potential KeyError in merge_compdb()
At the point where entry['directory']
is used, 'directory'
is definitely not in entry
as checked in if
two lines above https://github.com/nickdiego/compiledb/blob/b615d526019c7b809882090ea7eaff85423f2b13/compiledb/init.py#L88 On the other hand, 'file'
is guaranteed to be in entry
, because gen_key(c)
is called only if 'file' in c
https://github.com/nickdiego/compiledb/blob/b615d526019c7b809882090ea7eaff85423f2b13/compiledb/init.py#L95-L96 This looks like a "typo".