Skip to content

Commit 98c9e08

Browse files
Fix an ImportError w/Blosc on Android (#284)
Android does not have a functioning semaphore system (actually it's bionic-C that doesn't...). When trying to import numcodecs.blosc on Android, an ImportError exception was thrown - which was unhandled.
1 parent 091b519 commit 98c9e08

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

numcodecs/blosc.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ try:
7979
mutex = multiprocessing.Lock()
8080
except OSError:
8181
mutex = None
82+
except ImportError:
83+
mutex = None
8284

8385
# store ID of process that first loads the module, so we can detect a fork later
8486
_importer_pid = os.getpid()

0 commit comments

Comments
 (0)