Fix imports, sort requirements.
parent
4ffc8edeeb
commit
15b5e107d5
6
setup.py
6
setup.py
|
@ -47,10 +47,10 @@ setup(
|
|||
keywords="stix stix2 json cti cyber threat intelligence",
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
'pytz',
|
||||
'six',
|
||||
'python-dateutil',
|
||||
'pytz',
|
||||
'requests',
|
||||
'simplejson'
|
||||
'simplejson',
|
||||
'six'
|
||||
],
|
||||
)
|
||||
|
|
|
@ -529,7 +529,6 @@ class CompositeDataSource(object):
|
|||
"""
|
||||
return copy.deepcopy(self.data_sources.values())
|
||||
|
||||
|
||||
def deduplicate(self, stix_obj_list):
|
||||
"""Deduplicate a list of STIX objects to a unique set
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ from collections import OrderedDict
|
|||
|
||||
from .base import _STIXBase
|
||||
from .common import ExternalReference, GranularMarking
|
||||
from .properties import (BooleanProperty, IDProperty, IntegerProperty, ListProperty,
|
||||
ReferenceProperty, StringProperty, TimestampProperty,
|
||||
TypeProperty)
|
||||
from .properties import (BooleanProperty, IDProperty, IntegerProperty,
|
||||
ListProperty, ReferenceProperty, StringProperty,
|
||||
TimestampProperty, TypeProperty)
|
||||
from .utils import NOW
|
||||
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
"""Utility functions and classes for the stix2 library."""
|
||||
|
||||
from stix2 import base
|
||||
|
||||
import datetime as dt
|
||||
import json
|
||||
|
||||
from dateutil import parser
|
||||
import pytz
|
||||
|
||||
from .base import _STIXBase
|
||||
|
||||
# Sentinel value for properties that should be set to the current time.
|
||||
# We can't use the standard 'default' approach, since if there are multiple
|
||||
# timestamps in a single object, the timestamps will vary by a few microseconds.
|
||||
|
@ -132,7 +132,7 @@ def find_property_index(obj, properties, tuple_to_find):
|
|||
for pv in obj._inner.values():
|
||||
if isinstance(pv, list):
|
||||
for item in pv:
|
||||
if isinstance(item, base._STIXBase):
|
||||
if isinstance(item, _STIXBase):
|
||||
val = find_property_index(item,
|
||||
item._object_properties(),
|
||||
tuple_to_find)
|
||||
|
@ -145,7 +145,7 @@ def find_property_index(obj, properties, tuple_to_find):
|
|||
except ValueError:
|
||||
return len(tuple_to_find[0])
|
||||
for item in pv.values():
|
||||
if isinstance(item, base._STIXBase):
|
||||
if isinstance(item, _STIXBase):
|
||||
val = find_property_index(item,
|
||||
item._object_properties(),
|
||||
tuple_to_find)
|
||||
|
|
Loading…
Reference in New Issue