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.

This commit is contained in:
Homer S. 2021-07-22 09:31:59 +02:00
parent 97eb34814f
commit 2b65daff7f
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ from libs.monitoring import endedCall
from libs.message import conversion as conv from libs.message import conversion as conv
import urllib.request import urllib.request
import xmltodict, json import xmltodict, json
import sys, os import sys, os, time
import smbclient import smbclient
@ -97,7 +97,6 @@ def lastcall2matrix(tam,tam_no):
def fritzab2matrix(tam): def fritzab2matrix(tam):
### CHECK AND GET MESSAGES FROM FRITZBOX ### ### CHECK AND GET MESSAGES FROM FRITZBOX ###
############################################ ############################################
@ -173,6 +172,7 @@ def fritzab2matrix(tam):
def multitam(tams): def multitam(tams):
time.sleep(5)
for tam in tams.keys(): for tam in tams.keys():
print("Check TAM {}.".format(tam)) print("Check TAM {}.".format(tam))
fritzab2matrix(tam) fritzab2matrix(tam)