Skip to content

Commit

Permalink
Don't use follow_symlinks, it isn't supported on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
rblank committed Jan 10, 2025
1 parent a4ac4a2 commit 6ec19e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ def __init__(self, path, builder):
@lazy
def last_used(self):
try:
return (self.path / self.requirements_txt).stat(
follow_symlinks=False).st_mtime_ns
return (self.path / self.requirements_txt).stat().st_mtime_ns
except OSError:
return 0

Expand Down Expand Up @@ -152,7 +151,7 @@ def create(self, reqs):

def touch(self):
with contextlib.suppress(OSError):
os.utime(self.path / self.requirements_txt, follow_symlinks=False)
os.utime(self.path / self.requirements_txt)
with contextlib.suppress(AttributeError): del self.last_used

@contextlib.contextmanager
Expand Down

0 comments on commit 6ec19e3

Please sign in to comment.