catch ValueError

This commit is contained in:
Robert Kaussow 2023-01-16 21:42:07 +01:00
parent c7fc39b367
commit b3078fc0b8
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -231,8 +231,8 @@ class StandardBase(object, metaclass=StandardExtendedMeta):
StandardBase.Error(e.problem_mark.line + 1, f"syntax error: {e.problem}")
)
candidate.faulty = True
except TypeError as e:
errors.append(StandardBase.Error(None, e))
except (TypeError, ValueError) as e:
errors.append(StandardBase.Error(None, f"yamllint error: {e}"))
candidate.faulty = True
return errors