Skip to content

Commit 35bc91c

Browse files
committed
MNT: make move portable
os.raname does not work across filesystems
1 parent 67572bf commit 35bc91c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_websiteutils/make_redirects_links.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import subprocess
99
import sys
1010
import tempfile
11-
11+
import shutil
1212

1313
"""
1414
This script does two things that improve the website organization.
@@ -154,7 +154,7 @@ def update_canonical(fullname, last):
154154
fout.write(ll)
155155
else:
156156
fout.write(line)
157-
os.rename(fout.name, fullname)
157+
shutil.move(fout.name, fullname)
158158

159159

160160
if __name__ == "__main__":

0 commit comments

Comments
 (0)