From 88f0b4119c9c1212b614d91f380cf2ced1855140 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Sun, 1 Aug 2021 10:49:58 +0200 Subject: [PATCH] Exit if no server found --- jarvis/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jarvis/main.py b/jarvis/main.py index e950e94..be94e4b 100644 --- a/jarvis/main.py +++ b/jarvis/main.py @@ -1,5 +1,6 @@ import os import struct +import sys import threading import pvporcupine @@ -47,9 +48,8 @@ def record(): if __name__ == '__main__': - if config_utils.get_in_config('SERVER_IP') is None: - print("No server IP specified in config, looking trough the entire network... (might take a few seconds)") - server_utils.find_server_on_network() + if server_utils.get_server_ip() is None: + sys.exit(1) thread = threading.Thread(target=wake_word_listening).start()