catch all exceptions in testing script

pull/1419/head
Willem Melching 5 years ago
parent 6148f2641c
commit 2ecf054891
  1. 9
      selfdrive/test/eon_testing_slave.py

@ -2,7 +2,6 @@
import re import re
import time import time
import json import json
import base64
import requests import requests
import subprocess import subprocess
from common.timeout import Timeout from common.timeout import Timeout
@ -40,7 +39,7 @@ def heartbeat():
} }
while True: while True:
try:
with open(os.path.join(work_dir, "selfdrive", "common", "version.h")) as _versionf: with open(os.path.join(work_dir, "selfdrive", "common", "version.h")) as _versionf:
version = _versionf.read().split('"')[1] version = _versionf.read().split('"')[1]
@ -63,12 +62,10 @@ def heartbeat():
# 'screenshot': screenshot, # 'screenshot': screenshot,
'tmux': tmux, 'tmux': tmux,
} }
try:
with Timeout(10): with Timeout(10):
requests.post('http://%s/eon/heartbeat/' % MASTER_HOST, json=msg, timeout=5.0) requests.post('http://%s/eon/heartbeat/' % MASTER_HOST, json=msg, timeout=5.0)
except: except Exception as e:
print("Unable to reach master") print("Unable to send heartbeat", e)
time.sleep(5) time.sleep(5)

Loading…
Cancel
Save