Merge branch 'master' of github.com:oasis-open/cti-python-stix2
commit
0cf0f97143
|
@ -1,7 +1,7 @@
|
|||
[settings]
|
||||
check=1
|
||||
diff=1
|
||||
known_third_party=dateutil,pytest,pytz,six
|
||||
known_third_party=dateutil,pytest,pytz,six,requests
|
||||
known_first_party=stix2
|
||||
not_skip=__init__.py
|
||||
force_sort_within_sections=1
|
||||
|
|
|
@ -14,6 +14,9 @@ python:
|
|||
install:
|
||||
- pip install -U pip setuptools
|
||||
- pip install tox-travis pre-commit
|
||||
- pip install codecov
|
||||
script:
|
||||
- tox
|
||||
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then pre-commit run --all-files; fi
|
||||
after_success:
|
||||
- codecov
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import json
|
||||
|
||||
from stix2.sources.taxii import TAXIIDataSource
|
||||
|
||||
# Flask TAXII server - developmental
|
||||
|
|
1
setup.py
1
setup.py
|
@ -5,6 +5,7 @@ install_requires = [
|
|||
'pytz',
|
||||
'six',
|
||||
'python-dateutil',
|
||||
'requests',
|
||||
]
|
||||
|
||||
setup(
|
||||
|
|
|
@ -5,9 +5,12 @@ import copy
|
|||
import datetime as dt
|
||||
import json
|
||||
|
||||
from .exceptions import (AtLeastOnePropertyError, DependentPropertiesError, ExtraPropertiesError, ImmutableError,
|
||||
InvalidObjRefError, InvalidValueError, MissingPropertiesError, MutuallyExclusivePropertiesError,
|
||||
RevokeError, UnmodifiablePropertyError)
|
||||
from .exceptions import (AtLeastOnePropertyError, DependentPropertiesError,
|
||||
ExtraPropertiesError, ImmutableError,
|
||||
InvalidObjRefError, InvalidValueError,
|
||||
MissingPropertiesError,
|
||||
MutuallyExclusivePropertiesError, RevokeError,
|
||||
UnmodifiablePropertyError)
|
||||
from .utils import NOW, format_datetime, get_timestamp, parse_into_datetime
|
||||
|
||||
__all__ = ['STIXJSONEncoder', '_STIXBase']
|
||||
|
|
|
@ -206,7 +206,7 @@ class TAXIIDataSource(DataSource):
|
|||
all_data.append(stix_obj)
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
raise
|
||||
raise e
|
||||
# raise type(e), type(e)(e.message +
|
||||
# "Attempting to connect to %s" % coll_url)
|
||||
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -8,10 +8,8 @@ deps =
|
|||
pytest
|
||||
pytest-cov
|
||||
coverage
|
||||
codecov
|
||||
commands =
|
||||
py.test --cov=stix2 stix2/test/
|
||||
codecov
|
||||
py.test --cov=stix2 stix2/test/ --cov-report term-missing
|
||||
|
||||
passenv = CI TRAVIS TRAVIS_*
|
||||
|
||||
|
@ -32,7 +30,7 @@ max-line-length=160
|
|||
|
||||
[testenv:isort-check]
|
||||
deps = isort
|
||||
commands = isort -rc stix2 -c -df
|
||||
commands = isort -rc stix2 examples -c -df
|
||||
|
||||
[travis]
|
||||
python =
|
||||
|
|
Loading…
Reference in New Issue