Skip to content

Commit

Permalink
Fix deprecation warning about use of bool(parent_node).
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Aug 9, 2011
1 parent 0d184a4 commit 537ec12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decruft/decruft.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def sanitize(self, node, candidates):
content_length = len(el.text_content()) # Count the text length excluding any surrounding whitespace
link_density = self.get_link_density(el)
parent_node = el.getparent()
if parent_node:
if parent_node is not None:
if parent_node in candidates:
content_score = candidates[parent_node]['content_score']
else:
Expand Down

0 comments on commit 537ec12

Please sign in to comment.