Replace filter usage

This commit is contained in:
Matthias
2019-07-14 20:14:35 +02:00
parent 4238ee090d
commit dadf8adb3e
2 changed files with 3 additions and 2 deletions

View File

@@ -217,7 +217,8 @@ class Telegram(RPC):
"*Open Order:* `{open_order}`" if r['open_order'] else ""
]
messages.append("\n".join(filter(None, lines)).format(**r))
# Filter empty lines using list-comprehension
messages.append("\n".join([l for l in lines if l]).format(**r))
for msg in messages:
self._send_msg(msg, bot=bot)