##// END OF EJS Templates
bmstore: close file in a finally block in _writerepo...
Augie Fackler -
r27188:6a1301e2 default
parent child Browse files
Show More
@@ -132,9 +132,14 b' class bmstore(dict):'
132 wlock = repo.wlock()
132 wlock = repo.wlock()
133 try:
133 try:
134
134
135 file = repo.vfs('bookmarks', 'w', atomictemp=True)
135 file_ = repo.vfs('bookmarks', 'w', atomictemp=True)
136 self._write(file)
136 try:
137 file.close()
137 self._write(file_)
138 except: # re-raises
139 file_.discard()
140 raise
141 finally:
142 file_.close()
138
143
139 finally:
144 finally:
140 wlock.release()
145 wlock.release()
General Comments 0
You need to be logged in to leave comments. Login now