Without this, if something goes wrong in the constructor self._file
may not be initialized, which causes close(), invoked via __del__(),
to crash.
Thanks to Fabian Bakkum <fabianbakkum@hotmail.com> for reporting the
problem.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
# Map metadata hashes to bupindex.meta offsets.
self._offsets = {}
self._filename = filename
+ self._file = None
# FIXME: see how slow this is; does it matter?
m_file = open(filename, 'ab+')
try: