Skip to content

Commit

Permalink
Do not use len() to determine if a sequence is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored and martinblech committed May 8, 2022
1 parent 9482869 commit f2e6d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xmltodict.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def endElement(self, full_name):
should_continue = self.item_callback(self.path, item)
if not should_continue:
raise ParsingInterrupted()
if len(self.stack):
if self.stack:
data = (None if not self.data
else self.cdata_separator.join(self.data))
item = self.item
Expand Down

0 comments on commit f2e6d31

Please sign in to comment.