fix: Properly inform user when they try to run the live tests on old systems.

Fix #329
pull/331/head
Raphaël Vinot 2019-02-03 13:00:48 +01:00
parent 211a7e95dd
commit 02b99c23fa
1 changed files with 12 additions and 1 deletions

View File

@ -1,9 +1,11 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import unittest
from pymisp import ExpandedPyMISP, MISPEvent, MISPOrganisation, MISPUser, Distribution, ThreatLevel, Analysis, MISPObject
from pymisp.tools import make_binary_objects
from datetime import datetime, timedelta, date
from io import BytesIO
@ -13,6 +15,15 @@ import json
import time
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:
from keys import url, key
verifycert = False