Procházet zdrojové kódy

fix not existing params handling

Jens Keim před 6 roky
rodič
revize
cf47547713
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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: