anv: use dict.get in anv_entrypoints_gen.py

Instead of using an if and a check, use dict.get, which does the same
thing, but more succinctly.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
This commit is contained in:
Dylan Baker 2017-02-21 11:07:44 -08:00
parent 96a5f2a5ac
commit 4d4697f868
1 changed files with 1 additions and 4 deletions

View File

@ -295,10 +295,7 @@ def get_entrypoints(doc, entrypoints_to_defines):
shortname = fullname[2:]
params = (''.join(p.itertext()) for p in command.findall('./param'))
params = ', '.join(params)
if fullname in entrypoints_to_defines:
guard = entrypoints_to_defines[fullname]
else:
guard = None
guard = entrypoints_to_defines.get(fullname)
entrypoints.append((type, shortname, params, index, cal_hash(fullname), guard))
index += 1