Skip to content

Commit 68fb72d

Browse files
committed
Simplify
1 parent 85ba4f2 commit 68fb72d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugwise/helper.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def etree_to_dict(element: etree) -> dict[str, str]:
8080
"""Helper-function translating xml Element to dict."""
8181
node: dict[str, str] = {}
8282

83-
if (text := getattr(element, "text", None)) is not None:
84-
node["text"] = text
85-
83+
text = getattr(element, "text", None)
8684
if element is not None:
8785
node.update(element.items())
8886

0 commit comments

Comments
 (0)