mirror of https://github.com/commaai/openpilot.git
parent
a33a62c978
commit
d200f048b7
|
@ -283,8 +283,8 @@ def main():
|
|||
ov_lock_fd = open(LOCK_FILE, 'w')
|
||||
try:
|
||||
fcntl.flock(ov_lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
except IOError:
|
||||
raise RuntimeError("couldn't get overlay lock; is another updated running?")
|
||||
except IOError as e:
|
||||
raise RuntimeError("couldn't get overlay lock; is another updated running?") from e
|
||||
|
||||
# Wait for IsOffroad to be set before our first update attempt
|
||||
wait_helper = WaitTimeHelper(proc)
|
||||
|
|
|
@ -21,8 +21,8 @@ def get_token():
|
|||
with open(os.path.join(CONFIG_DIR, 'auth.json')) as f:
|
||||
auth = json.load(f)
|
||||
return auth['access_token']
|
||||
except Exception:
|
||||
raise MissingAuthConfigError('Authenticate with tools/lib/auth.py')
|
||||
except Exception as e:
|
||||
raise MissingAuthConfigError('Authenticate with tools/lib/auth.py') from e
|
||||
|
||||
|
||||
def set_token(token):
|
||||
|
|
|
@ -27,8 +27,8 @@ def index_log(fn):
|
|||
|
||||
try:
|
||||
dat = subprocess.check_output([index_log, fn, "-"])
|
||||
except subprocess.CalledProcessError:
|
||||
raise DataUnreadableError("%s capnp is corrupted/truncated" % fn)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise DataUnreadableError("%s capnp is corrupted/truncated" % fn) from e
|
||||
return np.frombuffer(dat, dtype=np.uint64)
|
||||
|
||||
def event_read_multiple_bytes(dat):
|
||||
|
|
Loading…
Reference in New Issue