mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Merge branch 'devel' of github.com:ansible/ansible into devel
This commit is contained in:
commit
cb18b3eb26
8 changed files with 535 additions and 84 deletions
|
@ -25,7 +25,7 @@ from ansible.color import stringc
|
|||
|
||||
dirname = os.path.dirname(__file__)
|
||||
callbacks = utils.import_plugins(os.path.join(dirname, 'callback_plugins'))
|
||||
callbacks = [ c.CallbackModule() for c in callbacks.values() ]
|
||||
callbacks = [ c.CallbackModule() for c in callbacks.values() if c.__name__ != '__init__' ]
|
||||
|
||||
cowsay = None
|
||||
if os.path.exists("/usr/bin/cowsay"):
|
||||
|
|
|
@ -317,16 +317,19 @@ def _gitinfo():
|
|||
branch = f.readline().split('/')[-1].rstrip("\n")
|
||||
f.close()
|
||||
branch_path = os.path.join(repo_path, "refs", "heads", branch)
|
||||
f = open(branch_path)
|
||||
commit = f.readline()[:10]
|
||||
f.close()
|
||||
date = time.localtime(os.stat(branch_path).st_mtime)
|
||||
if time.daylight == 0:
|
||||
offset = time.timezone
|
||||
else:
|
||||
offset = time.altzone
|
||||
result = "({0} {1}) last updated {2} (GMT {3:+04d})".format(branch, commit,
|
||||
time.strftime("%Y/%m/%d %H:%M:%S", date), offset / -36)
|
||||
if os.path.exists(branch_path):
|
||||
f = open(branch_path)
|
||||
commit = f.readline()[:10]
|
||||
f.close()
|
||||
date = time.localtime(os.stat(branch_path).st_mtime)
|
||||
if time.daylight == 0:
|
||||
offset = time.timezone
|
||||
else:
|
||||
offset = time.altzone
|
||||
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'
|
||||
return result
|
||||
|
||||
def version(prog):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue