From: Rob Browning Date: Sat, 28 Jun 2014 18:58:01 +0000 (-0500) Subject: Initialize _file in MetaStoreReader before open X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=54b557ab164498ed42244a68ade33ea53398641c;p=packages%2Fb%2Fbup.git Initialize _file in MetaStoreReader before open So that __del__() will work properly if open fails. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/index.py b/lib/bup/index.py index b99e6d3..794ff9f 100644 --- a/lib/bup/index.py +++ b/lib/bup/index.py @@ -30,6 +30,7 @@ class Error(Exception): class MetaStoreReader: def __init__(self, filename): + self._file = None self._file = open(filename, 'rb') def close(self):