Explorar o código

fix not existing params handling

Jens Keim %!s(int64=6) %!d(string=hai) anos
pai
achega
cf47547713
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      code/Attack/BaseAttack.py

+ 1 - 1
code/Attack/BaseAttack.py

@@ -361,7 +361,7 @@ class BaseAttack(metaclass=abc.ABCMeta):
         if isinstance(param, atkParam.Parameter):
             param_name = param
         # for values given by user input, like port.open
-        elif atkParam.Parameter(param):
+        elif any(param == item.value for item in atkParam.Parameter):
             # Get Enum key of given string identifier
             param_name = atkParam.Parameter(param)
         else: