From ed9d0cdf4a9a9c3062d5aaeb2d548a7af9060e8d Mon Sep 17 00:00:00 2001 From: "Brian J. Dowling" Date: Thu, 13 Oct 2016 14:35:45 -0400 Subject: [PATCH] Quick ansible-doc fix -- don't run pager if there was an error (no text) (cherry picked from commit 2be2f353739d4c0eec5f4dd6cdcbe28adcb2c78b) --- lib/ansible/cli/doc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 702b27ff105..510a677a1d5 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -136,7 +136,8 @@ class DocCLI(CLI): display.vvv(traceback.print_exc()) raise AnsibleError("module %s missing documentation (or could not parse documentation): %s\n" % (module, str(e))) - self.pager(text) + if text: + self.pager(text) return 0 def find_modules(self, path):