summaryrefslogtreecommitdiff
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-11-23 01:54:27 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2013-11-23 01:54:27 +0100
commitc3055be5f30a4b980356322e11a3d8e119059dbe (patch)
treefd9234c89a215e81a790b716d5dd988cab4ee4f6 /Lib/pathlib.py
parentf8d0ff9f423d56cc155da2a234a74b42eab95ac8 (diff)
downloadcpython-git-c3055be5f30a4b980356322e11a3d8e119059dbe.tar.gz
Trying other strategy for #19715: use utime(..., None)
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 06cbae5ce3..e73eca7ec9 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