summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-11-23 14:25:59 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-11-23 14:25:59 (GMT)
commit2cf3917954dab65c025ea39f8b6a0298c598f9f7 (patch)
tree5d1f3fde7633f83289b9ec2f9d6debb20670db74 /Lib/pathlib.py
parent91a7af3e48b7e36bd937998e7076c3fe2e812de2 (diff)
downloadcpython-2cf3917954dab65c025ea39f8b6a0298c598f9f7.zip
cpython-2cf3917954dab65c025ea39f8b6a0298c598f9f7.tar.gz
cpython-2cf3917954dab65c025ea39f8b6a0298c598f9f7.tar.bz2
Issue #19715: try the utime(..., None) approach again, now that it should be more precise under Windows
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 06cbae5..e73eca7 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -6,7 +6,6 @@ import os
import posixpath
import re
import sys
-import time
import weakref
try:
import threading
@@ -1076,9 +1075,8 @@ class Path(PurePath):
# First try to bump modification time
# Implementation note: GNU touch uses the UTIME_NOW option of
# the utimensat() / futimens() functions.
- t = time.time()
try:
- self._accessor.utime(self, (t, t))
+ self._accessor.utime(self, None)
except OSError:
# Avoid exception chaining
pass