mirror of https://github.com/MISP/PyMISP
fix: Properly inform user when they try to run the live tests on old systems.
Fix #329pull/331/head
parent
211a7e95dd
commit
02b99c23fa
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pymisp import ExpandedPyMISP, MISPEvent, MISPOrganisation, MISPUser, Distribution, ThreatLevel, Analysis, MISPObject
|
|
||||||
from pymisp.tools import make_binary_objects
|
from pymisp.tools import make_binary_objects
|
||||||
from datetime import datetime, timedelta, date
|
from datetime import datetime, timedelta, date
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
@ -13,6 +15,15 @@ import json
|
||||||
import time
|
import time
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
|
try:
|
||||||
|
from pymisp import ExpandedPyMISP, MISPEvent, MISPOrganisation, MISPUser, Distribution, ThreatLevel, Analysis, MISPObject
|
||||||
|
except ImportError:
|
||||||
|
if sys.version_info < (3, 6):
|
||||||
|
print('This test suite requires Python 3.6+, breaking.')
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from keys import url, key
|
from keys import url, key
|
||||||
verifycert = False
|
verifycert = False
|
||||||
|
|
Loading…
Reference in New Issue