Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions mitreattack/navlayers/core/technique.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from mitreattack.navlayers.core.exceptions import (
UNSETVALUE,
BadInput,
BadType,
MissingParameters,
UnknownTechniqueProperty,
handler,
Expand Down Expand Up @@ -94,12 +93,10 @@ def score(self):
@score.setter
def score(self, score):
"""Setter for score."""
try:
typeChecker(type(self).__name__, score, int, "score")
self.__score = score
except BadType:
typeChecker(type(self).__name__, score, float, "score")
self.__score = int(score)
if isinstance(score, float):
score = int(score)
typeChecker(type(self).__name__, score, int, "score")
self.__score = score

@property
def color(self):
Expand Down