From 18c9ef2dd35c0b30affd46c7ab56509ab7c2e122 Mon Sep 17 00:00:00 2001 From: Lukas Vacek Date: Tue, 24 May 2016 21:12:59 +0200 Subject: [PATCH] run_sim.py and run_json_proxy.py - warn user when MockGeoFix requires password --- helper_scripts/run_json_proxy.py | 4 ++++ helper_scripts/run_sim.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/helper_scripts/run_json_proxy.py b/helper_scripts/run_json_proxy.py index 53f4e38..380f0c5 100755 --- a/helper_scripts/run_json_proxy.py +++ b/helper_scripts/run_json_proxy.py @@ -45,6 +45,10 @@ def main(args): rlist, wlist, _ = select.select([s], [s], []) if s in rlist: x = s.recv(1024) + if "KO: password required" in x: + s.close() + print("Password protection is enabled MockGeoFix settings. This is not supported.") + sys.exit(2) if x == '': s.close() print("Connection closed.") diff --git a/helper_scripts/run_sim.py b/helper_scripts/run_sim.py index 7b57a0d..e219500 100755 --- a/helper_scripts/run_sim.py +++ b/helper_scripts/run_sim.py @@ -130,6 +130,10 @@ def start_geofix(args): rlist, wlist, _ = select.select([s], [s], []) if s in rlist: x = s.recv(1024) + if "KO: password required" in x: + s.close() + print("Password protection is enabled MockGeoFix settings. This is not supported.") + sys.exit(2) if x == '': s.close() print("Connection closed.")