pachyderm/python-pachyderm

need exception handling in spout code

Closed this issue · 1 comments

What happens if, here:

https://github.com/pachyderm/python-pachyderm/blob/master/src/python_pachyderm/spout.py#L63

The consumer of the with clause raises an Exception?

Presumably, we'll break the next time we call commit(). We should handle that exception and still release the resource, like in the example:

https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager

Fixed by #225