author | Yuya Nishihara <yuya@tcha.org> |
Thu, 19 Apr 2018 20:22:33 +0900 | |
branch | stable |
changeset 37796 | 968ac00c4017 |
parent 37795 | 68748c2c761b |
child 37797 | 43221a57e22f |
--- a/hgext/infinitepush/store.py Wed Apr 18 15:07:06 2018 +0200 +++ b/hgext/infinitepush/store.py Thu Apr 19 20:22:33 2018 +0900 @@ -86,12 +86,11 @@ def read(self, key): try: - f = open(self._filepath(key), 'rb') + with open(self._filepath(key), 'rb') as f: + return f.read() except IOError: return None - return f.read() - class externalbundlestore(abstractbundlestore): def __init__(self, put_binary, put_args, get_binary, get_args): """