From 5eae4353573b35710980cf082c15251e765884ce Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 16 Mar 2015 13:41:36 -0400 Subject: [PATCH] removed Darwin get_uptime_facts as it seems to crash on OS X, will waiy for a patch tested by someone that has access to the platform --- lib/ansible/module_utils/facts.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index c1951925e4b..93fe68786d8 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -1592,7 +1592,6 @@ class Darwin(Hardware): self.get_mac_facts() self.get_cpu_facts() self.get_memory_facts() - self.get_uptime_facts() return self.facts def get_sysctl(self): @@ -1640,11 +1639,6 @@ class Darwin(Hardware): if rc == 0: self.facts['memfree_mb'] = long(out.splitlines()[-1].split()[1]) / 1024 / 1024 - def get_uptime_facts(self): - kern_boottime = self.sysctl['kern.boottime'] - boottime = datetime.datetime.strptime(kern_boottime, "%a %b %d %H:%M:%S %Y") - delta = datetime.datetime.now() - boottime - self.facts['uptime_seconds'] = int(delta.total_seconds()) class Network(Facts): """