mirror of https://github.com/MISP/misp-modules
fix: Put the stix2-pattern library import in a try statement
--> Error more easily caughtpull/201/head
parent
5ff8bad85b
commit
90e42c0305
|
@ -1,5 +1,8 @@
|
||||||
import json
|
import json
|
||||||
from stix2patterns.validator import run_validator
|
try:
|
||||||
|
from stix2patterns.validator import run_validator
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
print("stix2 patterns python library is missing, use 'pip3 install stix2-patterns' to install it.")
|
||||||
|
|
||||||
misperrors = {'error': 'Error'}
|
misperrors = {'error': 'Error'}
|
||||||
mispattributes = {'input': ['stix2-pattern'], 'output': ['text']}
|
mispattributes = {'input': ['stix2-pattern'], 'output': ['text']}
|
||||||
|
|
Loading…
Reference in New Issue