]> arthur.barton.de Git - bup.git/commitdiff
Another suspicious fix for CatPipe parallelism.
authorAvery Pennarun <apenwarr@gmail.com>
Sun, 14 Feb 2010 08:35:45 +0000 (03:35 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 14 Feb 2010 08:35:45 +0000 (03:35 -0500)
This really shouldn't be necessary: it's clear to me that the 'it' object
should be going out of scope right away, and thus getting cleaned up by the
garbage collector.

But on one of my Linux PCs (with python 2.4.4) it fails the unit tests
unless I add this patch.  Oh well, let's do it then.

git.py

diff --git a/git.py b/git.py
index dbd61c145c32cf9b264769ece47171863f91a135..87ccf8f55c6ad755faca2d75de691551273e69b2 100644 (file)
--- a/git.py
+++ b/git.py
@@ -643,6 +643,7 @@ class CatPipe:
         yield type
         for blob in it:
             yield blob
+        del it
 
     def _slow_get(self, id):
         assert(id.find('\n') < 0)