Skip to content

Commit 875ce16

Browse files
committed
allow zonewriter move across filesystems
1 parent 641fea2 commit 875ce16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cwm_cdn_api/domains/zone_writer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import shutil
34
import datetime
45
import tempfile
56
import asyncio
@@ -70,7 +71,7 @@ async def main(zone_filepath, daemon=False):
7071
tmp.write(f"{left} IN CNAME {target}\n")
7172
tmp.write("\n")
7273
try:
73-
os.replace(tmp.name, zone_filepath)
74+
shutil.move(tmp.name, zone_filepath)
7475
except:
7576
os.remove(tmp.name)
7677
raise

0 commit comments

Comments
 (0)