mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Correct usage of fail_json in hg module (#25847)
Fix adds correct usage for fail_json and also adds testcases to verify this. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
committed by
René Moser
parent
561d678f52
commit
7348a613bb
@@ -157,7 +157,7 @@ class Hg(object):
|
||||
def get_remote_revision(self):
|
||||
(rc, out, err) = self._command(['id', self.repo])
|
||||
if rc != 0:
|
||||
self.module_fail_json(msg=err)
|
||||
self.module.fail_json(msg=err)
|
||||
else:
|
||||
return to_native(out).strip('\n')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user