fix pylint errors

old-commit-hash: 1e6c7c94e4
This commit is contained in:
Greg Hogan 2020-09-03 18:46:13 -07:00
parent a33a62c978
commit d200f048b7
3 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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):

View File

@ -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):