##// END OF EJS Templates
inifinitepush: fix filebundlestore to close file
Yuya Nishihara -
r37814:968ac00c stable
parent child Browse files
Show More
@@ -86,12 +86,11 b' class filebundlestore(object):'
86
86
87 def read(self, key):
87 def read(self, key):
88 try:
88 try:
89 f = open(self._filepath(key), 'rb')
89 with open(self._filepath(key), 'rb') as f:
90 return f.read()
90 except IOError:
91 except IOError:
91 return None
92 return None
92
93
93 return f.read()
94
95 class externalbundlestore(abstractbundlestore):
94 class externalbundlestore(abstractbundlestore):
96 def __init__(self, put_binary, put_args, get_binary, get_args):
95 def __init__(self, put_binary, put_args, get_binary, get_args):
97 """
96 """
General Comments 0
You need to be logged in to leave comments. Login now