dulwich-users team mailing list archive
-
dulwich-users team
-
Mailing list archive
-
Message #00370
Re: [PATCH 3/6] pack.FilePackIndex: close mmap object
On Mon, 2010-12-20 at 22:53 +0800, Tay Ray Chuan wrote:
> _load_file_contents may return a mmap object, so self._contents could be
> mmap-ed. Close it if so.
>
> Note: we use hasattr() instead of isinstance() for pre-Python 2.6
> compatibility (mmap became a class in Python 2.6).
Please use getattr() rather than hasattr() as the latter eats
exceptions.
Cheers,
Jelmer
Attachment:
signature.asc
Description: This is a digitally signed message part
Follow ups
References