Skip to content

Commit

Permalink
fix: [stix1 import] Making python 3.8 & 3.9 happy with typings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisr3d committed Oct 10, 2024
1 parent 9b288c2 commit 071f70b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misp_stix_converter/stix2misp/external_stix1_to_misp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from stix.indicator import Indicator
from stix.threat_actor import ThreatActor
from stix.ttp import TTP
from typing import Optional
from typing import Optional, Union

class ExternalSTIX1toMISPParser(STIX1toMISPParser, ExternalSTIXtoMISPParser):
def __init__(self):
Expand Down Expand Up @@ -165,7 +165,7 @@ def _parse_attributes_from_ttp(self, ttp: TTP, galaxies: set):
attributes[0].update(self._sanitise_attribute_uuid(ttp.id_))
return attributes

def _parse_description(self, stix_object: Indicator | Observable):
def _parse_description(self, stix_object: Union[Indicator, Observable]):
if stix_object.description:
misp_attribute = {
'type': 'text', 'value': stix_object.description.value
Expand Down

0 comments on commit 071f70b

Please sign in to comment.