Apply OrderedDict changes to Bundle.

stix2.1
Emmanuelle Vargas-Gonzalez 2017-08-14 09:24:41 -04:00
parent add14c2490
commit 1329e2e76f
1 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,7 @@
"""STIX 2 Bundle object"""
from collections import OrderedDict
from .base import _STIXBase
from .properties import IDProperty, Property, TypeProperty
@ -7,12 +9,13 @@ from .properties import IDProperty, Property, TypeProperty
class Bundle(_STIXBase):
_type = 'bundle'
_properties = {
'type': TypeProperty(_type),
'id': IDProperty(_type),
'spec_version': Property(fixed="2.0"),
'objects': Property(),
}
_properties = OrderedDict()
_properties = _properties.update([
('type', TypeProperty(_type)),
('id', IDProperty(_type)),
('spec_version', Property(fixed="2.0")),
('objects', Property()),
])
def __init__(self, *args, **kwargs):
# Add any positional arguments to the 'objects' kwarg.