From 5d39c0f6233be21ba969dda7313d1ddc0323d45c Mon Sep 17 00:00:00 2001 From: Colin Goutte Date: Fri, 1 Oct 2021 16:08:57 +0200 Subject: [PATCH] Yield magic replaced at proper place --- papi/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/papi/main.py b/papi/main.py index 6bc7412..58c7116 100644 --- a/papi/main.py +++ b/papi/main.py @@ -212,6 +212,8 @@ def list_notification_as_text( return mesures = sonde.mesures + res = [] + for previous, present in zip(mesures, mesures[1:]): date = present.content["date"] previous = utils.prepare(previous.content) @@ -219,7 +221,6 @@ def list_notification_as_text( all_channels = sorted(set((*previous["channels"], *present["channels"]))) diff = utils.compare(all_channels, previous, present) - res = [] if diff: for d in diff["changements"]: line = date, *utils.clean_state(d)