Fix string assignments to StructuredText

pull/382/head
Richard van den Berg 2015-01-29 17:14:01 +01:00
parent 09511986e7
commit 0aa09fec4d
1 changed files with 6 additions and 4 deletions

View File

@ -214,9 +214,10 @@ def handleNonIndicatorAttribute(incident, ttps, attribute):
addJournalEntry(incident, entry_line)
elif attribute["type"] == "target-machine":
aa = AffectedAsset()
aa.description = attribute["value"]
if attribute["comment"] != "":
aa.description += " " + attribute["comment"]
aa.description = attribute["value"] + " " + attribute["comment"]
else
aa.description = attribute["value"]
incident.affected_assets.append(aa)
elif attribute["type"] == "vulnerability":
generateTTP(incident, attribute)
@ -260,9 +261,10 @@ def generateThreatActor(attribute):
ta = ThreatActor()
ta.id_= namespace[1] + ":threatactor-" + attribute["uuid"]
ta.title = "MISP Attribute #" + attribute["id"] + " uuid: " + attribute["uuid"]
ta.description = attribute["value"]
if attribute["comment"] != "":
ta.description += " " + attribute["comment"]
ta.description = attribute["value"] + " " + attribute["comment"]
else
ta.description = attribute["value"]
return ta
# generate the indicator and add the relevant information