From 9f39d0562d14dbf6371d66bce85dbb4e8f416127 Mon Sep 17 00:00:00 2001 From: brent s Date: Wed, 17 Jun 2020 01:10:09 -0400 Subject: [PATCH] whoops, small bug --- repomirror/fetcher/_base.py | 2 +- repomirror/sync.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repomirror/fetcher/_base.py b/repomirror/fetcher/_base.py index c4094a1..7f8ac65 100644 --- a/repomirror/fetcher/_base.py +++ b/repomirror/fetcher/_base.py @@ -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 diff --git a/repomirror/sync.py b/repomirror/sync.py index daf7cf0..4da4286 100644 --- a/repomirror/sync.py +++ b/repomirror/sync.py @@ -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))