Remove uneeded code from pkg-map
This patch removes a couple of lines of redundant code. In Python, the get method on a dictionary defaults the return value to None, so the method never raises a key error. https://docs.python.org/2/library/stdtypes.html#typesmapping Change-Id: I180877f9be23d373cd63771bb3682d6587ec6fac
This commit is contained in:
parent
50cb019a25
commit
dcba738541
@ -89,9 +89,7 @@ def main():
|
|||||||
if distro_map:
|
if distro_map:
|
||||||
name_map.update(distro_map)
|
name_map.update(distro_map)
|
||||||
for name in extra:
|
for name in extra:
|
||||||
pkg_name = None
|
pkg_name = name_map.get(name)
|
||||||
if name in name_map:
|
|
||||||
pkg_name = name_map.get(name)
|
|
||||||
if pkg_name:
|
if pkg_name:
|
||||||
print(pkg_name)
|
print(pkg_name)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user