From 80f878894f219e1eb602d09150e69afea060c05d Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Tue, 5 Mar 2024 21:09:54 +0100 Subject: [PATCH] fix: add from_time/to_time in error msg --- src/main/python/fallback_csv.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/python/fallback_csv.py b/src/main/python/fallback_csv.py index 20fc885..edbde2c 100644 --- a/src/main/python/fallback_csv.py +++ b/src/main/python/fallback_csv.py @@ -77,12 +77,14 @@ def generate(master_dir, from_time, to_time, cache_file, dtype): data.append((date, float(temp), float(hum))) # set start and end # - print(line, date) + if "tu" in fname: + print(line, date) if not start and date: start = date elif date: end = date - print(end) + if "tu" in fname: + print(end) # save values # timeframes.append((start, end, data)) @@ -95,4 +97,5 @@ def generate(master_dir, from_time, to_time, cache_file, dtype): raise ValueError("Keine Datei mit passenden Daten gefunden. Bitte Readme lesen.\n\n" + "Zeiträume gefunden:\n" + - "\n\n".join(info_for_output_if_error)) + "\n\n".join(info_for_output_if_error) + + "\nZeitraum benötigt:\n" + "{} bis {}".format(from_time, to_time))