Skip to content

Commit f5df805

Browse files
committed
1 parent 25b2375 commit f5df805

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎thirdparty/magic/magic.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ def from_buffer(buffer, mime=False):
111111

112112
# This is necessary because find_library returns None if it doesn't find the library
113113
if dll:
114-
libmagic = ctypes.CDLL(dll)
114+
try:
115+
libmagic = ctypes.CDLL(dll)
116+
except WindowsError:
117+
pass
115118

116119
if not libmagic or not libmagic._name:
117120
import sys

0 commit comments

Comments
 (0)