mirror of
https://github.com/codelucas/newspaper.git
synced 2025-12-23 05:36:50 +00:00
using ternary instead of and
This commit is contained in:
parent
44555c9ad2
commit
2cb151edfe
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue