fix: linter fixes and added python 3.9 to tests
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
sudo: false
|
||||
language: python
|
||||
python:
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
@@ -158,8 +158,8 @@ def run_process(command, environ):
|
||||
env.update(environ)
|
||||
try:
|
||||
p = subprocess.Popen(args=command, env=env)
|
||||
except OSError as e:
|
||||
raise OSError('cannot run %r: %s' % (command, e))
|
||||
except OSError as exc:
|
||||
raise OSError('cannot run %r: %s' % (command, exc)) from exc
|
||||
log.debug('subprocess %d is running', p.pid)
|
||||
ret = p.wait()
|
||||
log.debug('subprocess %d exited: %d', p.pid, ret)
|
||||
|
||||
@@ -149,9 +149,9 @@ class Handler:
|
||||
try:
|
||||
sig_bytes = key['verifier'](sig=signature, msg=blob)
|
||||
log.info('signature status: OK')
|
||||
except formats.ecdsa.BadSignatureError:
|
||||
except formats.ecdsa.BadSignatureError as exc:
|
||||
log.exception('signature status: ERROR')
|
||||
raise ValueError('invalid ECDSA signature')
|
||||
raise ValueError('invalid ECDSA signature') from exc
|
||||
|
||||
log.debug('signature size: %d bytes', len(sig_bytes))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user