Changed main() to fritzab2matrix.py to not to mix up with the __main__ function. Also removed the while loop in the latter which didn't work despite of the recursive function. Also removed the recursive ended_call(main, env_ip) because that broke the script on one tested machine.
This commit is contained in:
parent
8c4bb4e452
commit
adc9eb0a3b
|
@ -26,7 +26,7 @@ if env_voicebox is None:
|
|||
if env_tmp is None:
|
||||
env_tmp = "/tmp"
|
||||
|
||||
def main():
|
||||
def fritzab2matrix():
|
||||
|
||||
### CHECK AND GET MESSAGES FROM FRITZBOX ###
|
||||
############################################
|
||||
|
@ -119,19 +119,16 @@ def main():
|
|||
continue
|
||||
|
||||
continue
|
||||
### Monitor the FritzBox and trigger the main script whenever a call disconnects ###
|
||||
###################################################################################
|
||||
endedCall(main, env_ip)
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
print("I enter the main loop ...")
|
||||
while main():
|
||||
pass
|
||||
else:
|
||||
print("I left the main loop!")
|
||||
fritzab2matrix()
|
||||
### Monitor the FritzBox and trigger the main script whenever a call disconnects ###
|
||||
###################################################################################
|
||||
endedCall(fritzab2matrix, env_ip)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue