##// END OF EJS Templates
bundlerepo: avoid exception in __del__ when the bundle doesn't exist...
Alexis S. L. Carvalho -
r3429:b19360aa default
parent child Browse files
Show More
@@ -233,10 +233,12 b' class bundlerepository(localrepo.localre'
233 233 self.bundlefile.close()
234 234
235 235 def __del__(self):
236 if not self.bundlefile.closed:
237 self.bundlefile.close()
238 if self.tempfile is not None:
239 os.unlink(self.tempfile)
236 bundlefile = getattr(self, 'bundlefile', None)
237 if bundlefile and not bundlefile.closed:
238 bundlefile.close()
239 tempfile = getattr(self, 'tempfile', None)
240 if tempfile is not None:
241 os.unlink(tempfile)
240 242
241 243 def instance(ui, path, create):
242 244 if create:
@@ -57,4 +57,5 b' cd partial'
57 57 hg -R bundle://../full.hg log
58 58 hg incoming bundle://../full.hg
59 59 hg -R bundle://../full.hg outgoing ../partial2
60 hg -R bundle://../does-not-exist.hg outgoing ../partial2
60 61 cd ..
@@ -208,3 +208,4 b' user: test'
208 208 date: Mon Jan 12 13:46:40 1970 +0000
209 209 summary: 0.3m
210 210
211 abort: No such file or directory: ../does-not-exist.hg
General Comments 0
You need to be logged in to leave comments. Login now