]> arthur.barton.de Git - bup.git/commit
compat.mmap: add py2 context management and use everywhere
authorRob Browning <rlb@defaultvalue.org>
Sun, 3 Oct 2021 18:25:08 +0000 (13:25 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 22 Nov 2021 16:35:28 +0000 (10:35 -0600)
commit6a3dea7dbaed2ffb94c020bfaf81f4fef85221cc
treefb6d4a6ca86d3284c31ea08a25350c3a75776e1c
parent20db61170c8a8fd4b452ec29f6a3133385c4fdad
compat.mmap: add py2 context management and use everywhere

It looks like py2 doesn't support mmap __enter__ and __exit__, so add
them, and switch all our mmap instances to be compat.mmap so that
we'll be able to context manage them.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/compat.py
lib/bup/helpers.py