Skip to content

Commit

Permalink
more pylint cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jupe committed Oct 2, 2020
1 parent 3ff704f commit 7c63fe4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lockable/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def release():
except OSError as error:
print(error, file=sys.stderr)
return candidate, release
except Timeout:
raise AssertionError('not success')
except Timeout as error:
raise AssertionError('not success') from error


@contextmanager
Expand All @@ -93,8 +93,8 @@ def doit(candidates_inner):
print(f'resource {resource["id"]} allocated ({json.dumps(resource)})')
yield resource
release()
except FunctionTimedOut:
raise TimeoutError(f'Allocation timeout ({timeout_s}s)')
except FunctionTimedOut as error:
raise TimeoutError(f'Allocation timeout ({timeout_s}s)') from error


@contextmanager
Expand Down

0 comments on commit 7c63fe4

Please sign in to comment.