From c8d029faa649add017ba13755fb3e03c3975d204 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 3 Jan 2016 11:42:27 -0600 Subject: [PATCH] PackWriter init: initialize file guard first Initialize the self.file variable first since it's used to test the state of the object. Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bup/git.py b/lib/bup/git.py index 38dbc31..5710f05 100644 --- a/lib/bup/git.py +++ b/lib/bup/git.py @@ -567,10 +567,10 @@ def _make_objcache(): class PackWriter: """Writes Git objects inside a pack file.""" def __init__(self, objcache_maker=_make_objcache, compression_level=1): + self.file = None self.count = 0 self.outbytes = 0 self.filename = None - self.file = None self.idx = None self.objcache_maker = objcache_maker self.objcache = None -- 2.39.2