praekelt/airtime-service — pull request #5 by jerith (2013-11-18 13:22:15+00:00)
Title: Wider connection close handling

From https://github.com/praekelt/airtime-service/issues/4#issuecomment-28695955

There are a few places in `airtime_services.api` where there is code like:

```python
conn = yield self.engine.connect()
pool = VoucherPool(voucher_pool, conn)
try:
...
finally:
conn.close()
```

I think the `pool = ...` needs to be inside the `try: ... ` block since the connection still needs to be closed if an exception is raised while creating VoucherPool?