mirror of
https://github.com/ansible/ansible
synced 2026-06-19 07:35:52 +00:00
Fix field names in exception messages (#87079)
This commit is contained in:
@@ -64,9 +64,9 @@ class Origin(AnsibleDatatagBase):
|
||||
def _post_validate(self) -> None:
|
||||
if self.path:
|
||||
if not self.path.startswith('/'):
|
||||
raise RuntimeError('The `src` field must be an absolute path.')
|
||||
raise RuntimeError('The `path` field must be an absolute path.')
|
||||
elif not self.description:
|
||||
raise RuntimeError('The `src` or `description` field must be specified.')
|
||||
raise RuntimeError('The `path` or `description` field must be specified.')
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""Renders the origin in the form of path:line_num:col_num, omitting missing/invalid elements from the right."""
|
||||
|
||||
Reference in New Issue
Block a user