zephyrproject-rtos / python-devicetree

Python devicetree library
15 stars 4 forks source link

edtlib: fix possible TypeError in Binding.__repr__() #3

Closed dottspina closed 1 year ago

dottspina commented 1 year ago

Calling Binding.__repr__() when the attribute Binding.path is None would raise:

TypeError:` expected str, bytes or os.PathLike object, not NoneType.

Known affected bindings include bindings for properties such as compatible, reg, status.

We should check the Binding.path attribute before calling os.path.basename().

Thanks.

-- chris

dottspina commented 1 year ago

It appears zephyr/scripts/dts is still the main repo for these libraries: should I instead propose this PR directly to the zephyr project ?

Thanks.

-- chris

mbolivar-nordic commented 1 year ago

should I instead propose this PR directly to the zephyr project ?

Yes please, thanks.