Skip to content

Commit 2b616b1

Browse files
committed
ffilib: Don't fail if "ffi" module not present, just return None.
1 parent 120b52c commit 2b616b1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ffilib/ffilib.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import sys
2-
import ffi
2+
try:
3+
import ffi
4+
except ImportError:
5+
ffi = None
36

47
_cache = {}
58

69
def open(name, maxver=10, extra=()):
10+
if not ffi:
11+
return None
712
try:
813
return _cache[name]
914
except KeyError:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy