fastmonkeys / stellar

Fast database snapshot and restore tool for development
MIT License
3.86k stars 119 forks source link

Use with statement to close file handle #25

Closed svisser closed 10 years ago

svisser commented 10 years ago

This applies the same change as in commit 07cfa81da31bf1f9903caaade52faefa26cc73ca (use with statement to ensure the file handle is closed).

pypingou commented 10 years ago

The only implication of this change is the minimal python 2 version supported, but since we have a couple of except XX as err in the code, we already are at a python 2.6 minimal.

svisser commented 10 years ago

Yes, that's true. I think Python 2.6 and Python 2.7 are the Python 2.x versions to support nowadays. The with statement is supported in both of them. It can be argued that, given that we're 3.4 already, one should aim to upgrade from Python 2.5 or below.