We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
compile
1 parent 94cb0c6 commit 482b35bCopy full SHA for 482b35b
1 file changed
maco/utils.py
@@ -77,6 +77,10 @@ def object_hook(self, obj):
77
try:
78
# Respect cases where the extractor is tied to certain version of yara-python for processing
79
import yara
80
+
81
+ if not hasattr(yara, "compile"):
82
+ raise ImportError("Loaded version does not have compile method, falling back to MACO's yara interface")
83
84
except:
85
# Otherwise fallback to MACO's interface for yara-python==4.5.x
86
from maco import yara
0 commit comments