Skip to content

Commit

Permalink
run_sim.py and run_json_proxy.py - warn user when MockGeoFix requires…
Browse files Browse the repository at this point in the history
… password
  • Loading branch information
Lukas Vacek committed May 24, 2016
1 parent 5edb1fc commit 18c9ef2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helper_scripts/run_json_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
4 changes: 4 additions & 0 deletions helper_scripts/run_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit 18c9ef2

Please sign in to comment.