CMakified znc-buildmod should also remove destination before writing new .so

To avoid crash of a running ZNC process.
This commit is contained in:
Alexey Sokolov
2017-12-17 10:07:52 +00:00
parent 5904d3e38b
commit bbc43e203c
+4
View File
@@ -96,4 +96,8 @@ with tempfile.TemporaryDirectory() as cmdir:
subprocess.check_call(['cmake', '--build', '.'], cwd=build)
for so in glob.iglob(os.path.join(build, '*.so')):
try:
os.remove(os.path.basename(so))
except OSError:
pass
shutil.copy(so, os.getcwd())