Apply OrderedDict changes to bundle, fix import in sdo.py
parent
cb5c4ad080
commit
e3f82effc7
|
@ -1,5 +1,6 @@
|
|||
"""STIX 2.0 Objects that are neither SDOs nor SROs"""
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from . import exceptions
|
||||
from .base import _STIXBase
|
||||
|
@ -31,12 +32,13 @@ class STIXObjectProperty(Property):
|
|||
class Bundle(_STIXBase):
|
||||
|
||||
_type = 'bundle'
|
||||
_properties = {
|
||||
'type': TypeProperty(_type),
|
||||
'id': IDProperty(_type),
|
||||
'spec_version': Property(fixed="2.0"),
|
||||
'objects': ListProperty(STIXObjectProperty),
|
||||
}
|
||||
_properties = OrderedDict()
|
||||
_properties.update([
|
||||
('type', TypeProperty(_type)),
|
||||
('id', IDProperty(_type)),
|
||||
('spec_version', Property(fixed="2.0")),
|
||||
('objects', ListProperty(STIXObjectProperty)),
|
||||
])
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Add any positional arguments to the 'objects' kwarg.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
from collections import OrderedDict
|
||||
|
||||
from .base import _STIXBase
|
||||
from .other import ExternalReference, GranularMarking
|
||||
from .common import ExternalReference, GranularMarking
|
||||
from .properties import (BooleanProperty, IDProperty, IntegerProperty, ListProperty,
|
||||
ReferenceProperty, StringProperty, TimestampProperty,
|
||||
TypeProperty)
|
||||
|
|
Loading…
Reference in New Issue