Skip to content

Commit

Permalink
Fix version_added test (ansible#69756)
Browse files Browse the repository at this point in the history
* Fix version_added test for changes in ansible#69680.

* Fix error message.
  • Loading branch information
felixfontein authored May 29, 2020
1 parent 8e19ab1 commit 4794b98
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ def _check_for_new_args(self, doc, metadata):
try:
mod_version_added = self.StrictVersion()
mod_version_added.parse(
str(existing_doc.get('version_added', '0.0'))
self._extract_version_from_tag_for_msg(str(existing_doc.get('version_added', '0.0')))
)
except ValueError:
mod_version_added = self.StrictVersion('0.0')
Expand Down Expand Up @@ -2062,7 +2062,7 @@ def _check_for_new_args(self, doc, metadata):
self.reporter.error(
path=self.object_path,
code='option-incorrect-version-added',
msg=('version_added for new option (%s) should '
msg=('version_added for existing option (%s) should '
'be %r. Currently %r' %
(option, existing_version, current_version))
)
Expand All @@ -2071,7 +2071,7 @@ def _check_for_new_args(self, doc, metadata):
try:
version_added = self.StrictVersion()
version_added.parse(
str(details.get('version_added', '0.0'))
self._extract_version_from_tag_for_msg(str(details.get('version_added', '0.0')))
)
except ValueError:
# already reported during schema validation
Expand Down

0 comments on commit 4794b98

Please sign in to comment.