From 2b65daff7f2165537928f850d9760ca358dde8d3 Mon Sep 17 00:00:00 2001 From: Homer S Date: Thu, 22 Jul 2021 09:31:59 +0200 Subject: [PATCH] Fixed issue #8 by adding a 5sec delay with time.sleep(5) to multitam(). Request for messages was too fast so that the new message wasn't in it yet. --- fritzab2matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fritzab2matrix.py b/fritzab2matrix.py index d1c5dfa..d8f80b2 100755 --- a/fritzab2matrix.py +++ b/fritzab2matrix.py @@ -8,7 +8,7 @@ from libs.monitoring import endedCall from libs.message import conversion as conv import urllib.request import xmltodict, json -import sys, os +import sys, os, time import smbclient @@ -97,7 +97,6 @@ def lastcall2matrix(tam,tam_no): def fritzab2matrix(tam): - ### CHECK AND GET MESSAGES FROM FRITZBOX ### ############################################ @@ -173,6 +172,7 @@ def fritzab2matrix(tam): def multitam(tams): + time.sleep(5) for tam in tams.keys(): print("Check TAM {}.".format(tam)) fritzab2matrix(tam)