aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-07-17 06:34:00 +0200
committerMichał Górny <mgorny@gentoo.org>2020-07-17 06:39:07 +0200
commit55a6bfdd9d3e2b8d0a59f5579de962fb82dde8ca (patch)
tree6cddd32d478764b7736e62c6c455da956966ee67 /lib/portage/_emirrordist/FetchTask.py
parentRemove support code for Python < 3.2 (diff)
downloadportage-55a6bfdd9d3e2b8d0a59f5579de962fb82dde8ca.tar.gz
portage-55a6bfdd9d3e2b8d0a59f5579de962fb82dde8ca.tar.bz2
portage-55a6bfdd9d3e2b8d0a59f5579de962fb82dde8ca.zip
Remove support code for Python < 3.3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'lib/portage/_emirrordist/FetchTask.py')
-rw-r--r--lib/portage/_emirrordist/FetchTask.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py
index 322de79ba..a1ba58822 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2019 Gentoo Authors
+# Copyright 2013-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
from __future__ import division
@@ -385,14 +385,9 @@ class FetchTask(CompositeTask):
# Apply the timestamp from the source file, but
# just rely on umask for permissions.
try:
- if sys.hexversion >= 0x3030000:
- os.utime(copier.dest_path,
- ns=(self._current_stat.st_mtime_ns,
- self._current_stat.st_mtime_ns))
- else:
- os.utime(copier.dest_path,
- (self._current_stat[stat.ST_MTIME],
- self._current_stat[stat.ST_MTIME]))
+ os.utime(copier.dest_path,
+ ns=(self._current_stat.st_mtime_ns,
+ self._current_stat.st_mtime_ns))
except OSError as e:
msg = "%s %s utime failed unexpectedly: %s" % \
(self.distfile, current_mirror.name, e)