1
0
mirror of https://github.com/skaringa/water-counter.git synced 2024-11-23 18:04:25 +01:00

Avoid error when no data is available

This commit is contained in:
Martin Kompf 2019-09-24 15:06:21 +02:00
parent dcd1ac89df
commit 05004cbac0

View File

@ -73,6 +73,7 @@ def detect_pauses(data):
def main(): def main():
#counter = read_fetch_output() #counter = read_fetch_output()
counter = read_rrd() counter = read_rrd()
if len(counter) > 0:
pauses = detect_pauses(counter) pauses = detect_pauses(counter)
if verbose: if verbose:
for p in pauses: for p in pauses: