Merge branch 'master' of github.com:oasis-open/cti-python-stix2
commit
f049c98d43
|
@ -498,7 +498,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"As with indicators, the ``type``, ``id``, ``created``, and ``modified`` properties will be set automatically if not provided. For Malware objects, the ``labels`` and ``name`` properties must be provided.\n",
|
"As with indicators, the ``type``, ``id``, ``created``, and ``modified`` properties will be set automatically if not provided. For Malware objects, the ``labels`` and ``name`` properties must be provided.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"You can see the full list of SDO classes [here](../api/stix2.v20.sdo.rst)."
|
"You can see the full list of SDO classes [here](../api/v20/stix2.v20.sdo.rst)."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ def _validate_selector(obj, selector):
|
||||||
|
|
||||||
|
|
||||||
def _get_marking_id(marking):
|
def _get_marking_id(marking):
|
||||||
if type(marking).__name__ is 'MarkingDefinition': # avoid circular import
|
if type(marking).__name__ == 'MarkingDefinition': # avoid circular import
|
||||||
return marking.id
|
return marking.id
|
||||||
return marking
|
return marking
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ class ListProperty(Property):
|
||||||
|
|
||||||
if type(self.contained) is EmbeddedObjectProperty:
|
if type(self.contained) is EmbeddedObjectProperty:
|
||||||
obj_type = self.contained.type
|
obj_type = self.contained.type
|
||||||
elif type(self.contained).__name__ is "STIXObjectProperty":
|
elif type(self.contained).__name__ == "STIXObjectProperty":
|
||||||
# ^ this way of checking doesn't require a circular import
|
# ^ this way of checking doesn't require a circular import
|
||||||
# valid is already an instance of a python-stix2 class; no need
|
# valid is already an instance of a python-stix2 class; no need
|
||||||
# to turn it into a dictionary and then pass it to the class
|
# to turn it into a dictionary and then pass it to the class
|
||||||
|
|
Loading…
Reference in New Issue