fix pylint errors

pull/2130/head
Greg Hogan 5 years ago
parent 05c16b1ff9
commit 1e6c7c94e4
  1. 4
      selfdrive/updated.py
  2. 4
      tools/lib/auth_config.py
  3. 4
      tools/lib/logreader.py

@ -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…
Cancel
Save