From 3f0b3a71caefb22369041dfa2dabb43249c3499d Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 28 Oct 2013 23:41:18 +0100 Subject: [PATCH] Fix #4702, make setup work on windows --- library/system/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/system/setup b/library/system/setup index 107a3bd712..1813c60ee9 100755 --- a/library/system/setup +++ b/library/system/setup @@ -445,7 +445,7 @@ class Facts(object): self.facts['date_time']['minute'] = now.strftime('%M') self.facts['date_time']['second'] = now.strftime('%S') self.facts['date_time']['epoch'] = now.strftime('%s') - if self.facts['date_time']['epoch'][0] == '%': + if self.facts['date_time']['epoch'] == '' or self.facts['date_time']['epoch'][0] == '%': self.facts['date_time']['epoch'] = str(int(time.time())) self.facts['date_time']['date'] = now.strftime('%Y-%m-%d') self.facts['date_time']['time'] = now.strftime('%H:%M:%S')