Skip to content

Commit 41f6b9c

Browse files
Refactor attribute filtering in PlexObject class (#1341)
* Refactor attribute filtering in PlexObject class - minor performance imporvement * Update plexapi/base.py Co-authored-by: JonnyWong16 <[email protected]> --------- Co-authored-by: JonnyWong16 <[email protected]>
1 parent 9d9dca8 commit 41f6b9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: plexapi/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def _getAttrValue(self, elem, attrstr, results=None):
440440
attrstr = parts[1] if len(parts) == 2 else None
441441
if attrstr:
442442
results = [] if results is None else results
443-
for child in [c for c in elem if c.tag.lower() == attr.lower()]:
443+
for child in (c for c in elem if c.tag.lower() == attr.lower()):
444444
results += self._getAttrValue(child, attrstr, results)
445445
return [r for r in results if r is not None]
446446
# check were looking for the tag

0 commit comments

Comments
 (0)