1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Tweak utime call

Apparently, times is not a keyword argument either in Python 2.7 ;)
This commit is contained in:
Xavier Fernandez 2019-07-12 23:11:24 +02:00 committed by GitHub
parent 8e57084a94
commit 3e8ccc99e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,6 +237,6 @@ class Path(_base):
def touch(self): def touch(self):
with open(self, "a") as fp: with open(self, "a") as fp:
path = fp.fileno() if os.utime in supports_fd else self path = fp.fileno() if os.utime in supports_fd else self
os.utime(path, times=None) # times is not optional on Python 2.7 os.utime(path, None) # times is not optional on Python 2.7
curdir = Path(os.path.curdir) curdir = Path(os.path.curdir)