Merge branch 'master' of github.com:oasis-open/cti-python-stix2

stix2.1
Emmanuelle Vargas-Gonzalez 2017-06-02 07:15:01 -04:00
commit 0cf0f97143
7 changed files with 15 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,5 @@
import json
from stix2.sources.taxii import TAXIIDataSource
# Flask TAXII server - developmental

View File

@ -5,6 +5,7 @@ install_requires = [
'pytz',
'six',
'python-dateutil',
'requests',
]
setup(

View File

@ -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']

View File

@ -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)

View File

@ -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 =