From: robk-tahoe Date: Mon, 21 Jan 2008 22:25:15 +0000 (-0700) Subject: offloaded: reinstate fix for windows tests X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/frontends/%22doc.html/?a=commitdiff_plain;h=d1de1f180afd8a83361a201553ea138eea827d94;p=tahoe-lafs%2Ftahoe-lafs.git offloaded: reinstate fix for windows tests in a discussion the other day, brian had asked me to try removing this fix, since it leads to double-closing the reader. since on my windows box, the test failures I'd experienced were related to the ConnectionLost exception problem, and this close didn't see to make a difference to test results, I agreed. turns out that the buildbot's environment does fail without this fix, even with the exception fix, as I'd kind of expected. it makes sense, because the reader (specifically the file handle) must be closed before it can be unlinked. at any rate, I'm reinstating this, in order to fix the windows build --- diff --git a/src/allmydata/offloaded.py b/src/allmydata/offloaded.py index 9f1966c1..66b7fbc7 100644 --- a/src/allmydata/offloaded.py +++ b/src/allmydata/offloaded.py @@ -92,6 +92,7 @@ class CHKUploadHelper(Referenceable, upload.CHKUploader): def _finished(self, res): (uri_extension_hash, needed_shares, total_shares, size) = res upload_results = {'uri_extension_hash': uri_extension_hash} + self._reader.close() os.unlink(self._encoding_file) self._finished_observers.fire(upload_results) self._helper.upload_finished(self._storage_index)