Skip to content

Commit 017224c

Browse files
committed
remove change from 'FileCacheManager'
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 91886bb commit 017224c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

python/triton/runtime/cache.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,7 @@ def put(self, data, filename, binary=True) -> str:
131131
f.write(data)
132132
# Replace is guaranteed to be atomic on POSIX systems if it succeeds
133133
# so filepath cannot see a partial write
134-
try:
135-
os.replace(temp_path, filepath)
136-
except PermissionError:
137-
# Ignore PermissionError on Windows because it happens when another process already
138-
# put a file into the cache and locked it by opening it.
139-
if os.name == "nt":
140-
os.remove(temp_path)
141-
else:
142-
raise
134+
os.replace(temp_path, filepath)
143135
os.removedirs(temp_dir)
144136
return filepath
145137

0 commit comments

Comments
 (0)