]> arthur.barton.de Git - bup.git/commitdiff
ShaBloom.init(): initialize members before the assert().
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 7 Feb 2011 09:25:32 +0000 (01:25 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 7 Feb 2011 09:31:50 +0000 (01:31 -0800)
Otherwise __del__() throws an exception if the assert triggers, thus hiding
the original problem.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/git.py

index 31c94dd5e3a660b1ecb424e126f977ed90fc2188..5c829183edc1aaecb859b1ed0b8d25e983afb57c 100644 (file)
@@ -351,6 +351,8 @@ class ShaBloom:
     """
     def __init__(self, filename, f=None, readwrite=False):
         self.name = filename
+        self.rwfile = None
+        self.map = None
         assert(filename.endswith('.bloom'))
         if readwrite:
             self.rwfile = f or open(filename, 'r+b')