whoops, small bug
This commit is contained in:
parent
0b2b74888f
commit
9f39d0562d
@ -27,7 +27,7 @@ class BaseFetcher(object):
|
||||
if v:
|
||||
tstmp_raw = self.fetch_content(v.path).decode('utf-8').strip()
|
||||
if '%s' in v.fmt:
|
||||
tstmp = datetime.datetime.fromtimestamp(int(tstmp_raw))
|
||||
tstmp = datetime.datetime.fromtimestamp(float(tstmp_raw))
|
||||
else:
|
||||
tstmp = datetime.datetime.strptime(tstmp_raw, v.fmt)
|
||||
self.timestamps[k] = tstmp
|
||||
|
@ -111,7 +111,7 @@ class TimestampFile(object):
|
||||
with open(path, 'r') as fh:
|
||||
ts_raw = fh.read().strip()
|
||||
if '%s' in self.fmt:
|
||||
timestamp = datetime.datetime.fromtimestamp(int(ts_raw))
|
||||
timestamp = datetime.datetime.fromtimestamp(float(ts_raw))
|
||||
else:
|
||||
timestamp = datetime.datetime.strptime(ts_raw, self.fmt)
|
||||
_logger.debug('Read timestamp {0} from {1}'.format(str(timestamp), self.path))
|
||||
|
Loading…
Reference in New Issue
Block a user