summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrent s <bts@square-r00t.net>2020-06-17 01:10:09 -0400
committerbrent s <bts@square-r00t.net>2020-06-17 01:10:09 -0400
commit9f39d0562d14dbf6371d66bce85dbb4e8f416127 (patch)
tree4b5435046f33343309d9ba9f7729ddd61f6b4702
parent0b2b74888faa4693097f6916950da1d65ebd1b3f (diff)
downloadRepoMirror-9f39d0562d14dbf6371d66bce85dbb4e8f416127.tar.xz
whoops, small bug
-rw-r--r--repomirror/fetcher/_base.py2
-rw-r--r--repomirror/sync.py2
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))