aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/portage/util/_compare_files.py')
-rw-r--r--lib/portage/util/_compare_files.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/portage/util/_compare_files.py b/lib/portage/util/_compare_files.py
index bd993e501..c3223d956 100644
--- a/lib/portage/util/_compare_files.py
+++ b/lib/portage/util/_compare_files.py
@@ -1,4 +1,4 @@
-# Copyright 2019 Gentoo Authors
+# Copyright 2019-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
__all__ = ["compare_files"]
@@ -49,20 +49,12 @@ def compare_files(file1, file2, skipped_types=()):
if "xattr" not in skipped_types and sorted(xattr.get_all(file1, nofollow=True)) != sorted(xattr.get_all(file2, nofollow=True)):
differences.append("xattr")
- if sys.hexversion >= 0x3030000:
- if "atime" not in skipped_types and file1_stat.st_atime_ns != file2_stat.st_atime_ns:
- differences.append("atime")
- if "mtime" not in skipped_types and file1_stat.st_mtime_ns != file2_stat.st_mtime_ns:
- differences.append("mtime")
- if "ctime" not in skipped_types and file1_stat.st_ctime_ns != file2_stat.st_ctime_ns:
- differences.append("ctime")
- else:
- if "atime" not in skipped_types and file1_stat.st_atime != file2_stat.st_atime:
- differences.append("atime")
- if "mtime" not in skipped_types and file1_stat.st_mtime != file2_stat.st_mtime:
- differences.append("mtime")
- if "ctime" not in skipped_types and file1_stat.st_ctime != file2_stat.st_ctime:
- differences.append("ctime")
+ if "atime" not in skipped_types and file1_stat.st_atime_ns != file2_stat.st_atime_ns:
+ differences.append("atime")
+ if "mtime" not in skipped_types and file1_stat.st_mtime_ns != file2_stat.st_mtime_ns:
+ differences.append("mtime")
+ if "ctime" not in skipped_types and file1_stat.st_ctime_ns != file2_stat.st_ctime_ns:
+ differences.append("ctime")
if "type" in differences:
pass