Skip to content

Commit e3c8211

Browse files
committed
use replace() instead of rename()
The former cannot replace an existing file on Windows.
1 parent 79d33d9 commit e3c8211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/osmium/tools/pyosmium_up_to_date.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def update_from_custom_server(start: ReplicationStart, options: Any) -> int:
153153
return 3
154154

155155
if outfile is None:
156-
os.rename(ofname, infile)
156+
os.replace(ofname, infile)
157157
finally:
158158
if outfile is None:
159159
try:

0 commit comments

Comments
 (0)