From 120fc29643419ff25d5bc2ee86ea2509c5fec281 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 12 Jul 2018 21:54:31 +0200 Subject: [PATCH] use dict comprehension --- freqtrade/rpc/webhook.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/freqtrade/rpc/webhook.py b/freqtrade/rpc/webhook.py index 35631182b..b3c22ee0e 100644 --- a/freqtrade/rpc/webhook.py +++ b/freqtrade/rpc/webhook.py @@ -49,10 +49,8 @@ class Webhook(RPC): if not valuedict: logger.info("Message type %s not configured for webhooks", msg['type']) return - payload = {} - for k in valuedict: - payload[k] = valuedict[k].format(**msg) + payload = {key: value.format(**msg) for (key, value) in valuedict.items()} self._send_msg(payload) except KeyError as exc: logger.exception("Problem calling Webhook. Please check your webhook configuration. "