From 2843e31e0913626697b2b97ed01ae50127e357aa Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 4 Sep 2012 21:07:29 -0400 Subject: [PATCH] Don't add 'n/a' because if running from source there will be no git --- lib/ansible/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py index c2bbaaed47..9bf489a508 100644 --- a/lib/ansible/utils.py +++ b/lib/ansible/utils.py @@ -333,7 +333,7 @@ def _gitinfo(): # There is a posibility the .git file to have an absolute path. repo_path = os.path.join(repo_path, os.path.relpath(central_gitdir), '.git') except (IOError, AttributeError): - return 'n/a' + return '' f = open(os.path.join(repo_path, "HEAD")) branch = f.readline().split('/')[-1].rstrip("\n") f.close() @@ -350,7 +350,7 @@ def _gitinfo(): result = "({0} {1}) last updated {2} (GMT {3:+04d})".format(branch, commit, time.strftime("%Y/%m/%d %H:%M:%S", date), offset / -36) else: - result = 'n/a' + result = '' return result def version(prog):