fix joining cache entries if there is no such toolchain key (#32)

This commit is contained in:
irengrig 2018-08-17 22:33:48 +02:00 committed by GitHub
parent 66f0863c32
commit 2bfa976185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,9 @@ def _join_cache_options(ctx, toolchain_entries, user_entries):
cache_entries = dict(toolchain_entries)
for key in user_entries:
existing = cache_entries[key] or []
existing = []
if hasattr(cache_entries, key):
existing = cache_entries[key]
cache_entries[key] = existing + [user_entries[key]]
return [_option(ctx, key, cache_entries[key]) for key in cache_entries]