Skip to content

Commit

Permalink
More converting
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrizek committed Jan 20, 2020
1 parent 4507f91 commit d023df6
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions lib/ansible/cli/arguments/option_helpers.py
Expand Up @@ -163,24 +163,31 @@ def _gitinfo():

def version(prog=None):
""" return ansible version """
u_version = to_text(__version__)
if prog:
result = u" ".join((prog, __version__))
result = u" ".join((prog, u_version))
else:
result = __version__
result = u_version

gitinfo = _gitinfo()
if gitinfo:
result = result + u" {0}".format(gitinfo)
result += u"\n config file = %s" % to_text(C.CONFIG_FILE)

if C.DEFAULT_MODULE_PATH is None:
cpath = u"Default w/o overrides"
else:
cpath = u":".join(C.DEFAULT_MODULE_PATH)
python_module_location = u":".join(map(to_text, ansible.__path__))
result = result + u"\n configured module search path = %s" % cpath

python_module_location = u":".join(map(to_text, ansible.__path__))
result = result + u"\n ansible python module location = %s" % python_module_location
result = result + u"\n executable location = %s" % to_text(sys.argv[0])
result = result + u"\n python version = %s" % ''.join(sys.version.splitlines())

executable_location = to_text(sys.argv[0])
result = result + u"\n executable location = %s" % executable_location

python_version = u"".join(map(to_text, sys.version.splitlines()))
result = result + u"\n python version = %s" % python_version
return result


Expand Down

0 comments on commit d023df6

Please sign in to comment.