Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devicetree: edtlib: fix possible AttributeError in Property.description #51139

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/dts/python-devicetree/src/devicetree/edtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,8 +1610,8 @@ class Property:
Convenience for spec.name.

description:
Convenience for spec.name with leading and trailing whitespace
(including newlines) removed.
Convenience for spec.description with leading and trailing whitespace
(including newlines) removed. May be None.

type:
Convenience for spec.type.
Expand Down Expand Up @@ -1655,7 +1655,7 @@ def name(self):
@property
def description(self):
"See the class docstring"
return self.spec.description.strip()
return self.spec.description.strip() if self.spec.description else None

@property
def type(self):
Expand Down