using ternary instead of and

This commit is contained in:
James M. Allen 2017-06-14 16:50:30 -04:00 committed by GitHub
parent 44555c9ad2
commit 2cb151edfe

View file

@ -106,7 +106,7 @@ class OutputFormatter(object):
self.top_node, "*[gravityScore]")
for item in gravity_items:
score = self.parser.getAttribute(item, 'gravityScore')
score = score and float(score) or 0
score = float(score) if score else 0
if score < 1:
item.getparent().remove(item)