Skip to content

Commit 9cd3150

Browse files
committed
Merge branch 'main' into ds-an-lg-relationships
2 parents 39adaff + a8dd03b commit 9cd3150

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

mitreattack/navlayers/core/technique.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from mitreattack.navlayers.core.exceptions import (
44
UNSETVALUE,
55
BadInput,
6-
BadType,
76
MissingParameters,
87
UnknownTechniqueProperty,
98
handler,
@@ -94,12 +93,10 @@ def score(self):
9493
@score.setter
9594
def score(self, score):
9695
"""Setter for score."""
97-
try:
98-
typeChecker(type(self).__name__, score, int, "score")
99-
self.__score = score
100-
except BadType:
101-
typeChecker(type(self).__name__, score, float, "score")
102-
self.__score = int(score)
96+
if isinstance(score, float):
97+
score = int(score)
98+
typeChecker(type(self).__name__, score, int, "score")
99+
self.__score = score
103100

104101
@property
105102
def color(self):

0 commit comments

Comments
 (0)