Skip to content
Commit 5abce9b8 authored by Chris Duf's avatar Chris Duf Committed by Stephanos Ioannidis
Browse files

Devicetree: edtlib: fix possible KeyError in Binding.description



Attempting to access the Binding.description property
when the description is unavailable would raise KeyError: 'description'.

Known bindings that won't define a 'description' key in the
Binding.raw dictionary include the 'compatible' property's binding
of nodes such as /, /soc, /leds or /pwmleds.
Note that this may also occur when a proper YAML
binding file is available (e.g. pwmleds.yaml).

This patch simply substitutes the Binding.raw dictionary indexing
with the get() function: will return None and not raise KeyError.

Signed-off-by: default avatarChris Duf <chris@openmarl.org>
parent e7384974
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment