Commit d6bcc5a4 authored by Nicolas Wavrant's avatar Nicolas Wavrant

repozo: do not close file in concat function

But let the caller opening the file closing it
parent a8358277
......@@ -360,8 +360,6 @@ def concat(files, ofp=None):
ifp = open(f, 'rb')
bytesread += dofile(func, ifp)
ifp.close()
if ofp:
ofp.close()
return bytesread, sum.hexdigest()
......
......@@ -414,7 +414,7 @@ class Test_concat(OptionsTestBase, unittest.TestCase):
ofp = Faux()
bytes, sum = self._callFUT(files, ofp)
self.assertEqual(ofp._written, [x.encode() for x in 'ABC'])
self.assertTrue(ofp._closed)
self.assertFalse(ofp._closed)
_marker = object()
class Test_gen_filename(OptionsTestBase, unittest.TestCase):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment