From: Avery Pennarun Date: Mon, 7 Feb 2011 09:25:32 +0000 (-0800) Subject: ShaBloom.init(): initialize members before the assert(). X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=10a376d23981f27f94c63d2fa82d9f4a2b656f99;p=packages%2Fb%2Fbup.git ShaBloom.init(): initialize members before the assert(). Otherwise __del__() throws an exception if the assert triggers, thus hiding the original problem. Signed-off-by: Avery Pennarun --- diff --git a/lib/bup/git.py b/lib/bup/git.py index 31c94dd..5c82918 100644 --- a/lib/bup/git.py +++ b/lib/bup/git.py @@ -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')