--- a/repoapi.py Thu Jun 27 18:16:06 2013 +0200 +++ b/repoapi.py Thu Jun 27 15:13:47 2013 +0200 @@ -162,6 +162,7 @@ self._cnx = self._session.new_cnx() self._cnx.__enter__() self._cnx.ctx_count += 1 + return self def __exit__(self, exc_type, exc_val, exc_tb): self._open = False