summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-04-16 05:06:01 +0300
committerMaxim Devaev <[email protected]>2023-04-16 05:06:01 +0300
commitfc2efb6ba9f06b39434ce4d5545fd666ae6f075a (patch)
tree072c00149e387c8e1fa3ac51153be9463058eede
parent2d1969a9a16da90ffbcb28ffdc551e8f99e720a4 (diff)
refactoring
-rw-r--r--kvmd/validators/basic.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/validators/basic.py b/kvmd/validators/basic.py
index 059ec226..ba517bb8 100644
--- a/kvmd/validators/basic.py
+++ b/kvmd/validators/basic.py
@@ -113,9 +113,9 @@ def valid_string_list(
if not isinstance(arg, (list, tuple)):
arg = check_not_none_string(arg, name)
arg = list(filter(None, re.split(delim, arg)))
- if subval is not None:
- try:
- arg = list(map(subval, arg))
- except Exception:
- raise ValidatorError(f"Failed sub-validator on one of the item of {arg!r}")
+
+ try:
+ arg = list(map(subval, arg))
+ except Exception:
+ raise ValidatorError(f"Failed sub-validator on one of the item of {arg!r}")
return arg