From abf896b791dd47555da69c03975157a8074f3c90 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 28 Nov 2023 10:47:30 -0700 Subject: [PATCH] Fix bug in __init_memmap --- pyboof/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyboof/__init__.py b/pyboof/__init__.py index df71cea..fa1add9 100644 --- a/pyboof/__init__.py +++ b/pyboof/__init__.py @@ -157,7 +157,7 @@ def __init_memmap(size_mb=20): # Open file in read,write,binary mode pbg.mmap_fid = open(mmap_path, "r+b") if os.name == 'nt': - mmap_file = mmap.mmap(pbg.mmap_fid.fileno(), length=0) + pbg.mmap_file = mmap.mmap(pbg.mmap_fid.fileno(), length=0) else: pbg.mmap_file = mmap.mmap(pbg.mmap_fid.fileno(), length=0, flags=mmap.MAP_SHARED, prot=mmap.PROT_READ | mmap.PROT_WRITE)