preexisting directory does not crash the program
This commit is contained in:
parent
476635219b
commit
00bba345f9
|
@ -112,7 +112,8 @@ def handle_event(event):
|
||||||
print('HUPing nginx')
|
print('HUPing nginx')
|
||||||
os.kill(pid, signal.SIGHUP)
|
os.kill(pid, signal.SIGHUP)
|
||||||
|
|
||||||
os.mkdir(target_path)
|
if not os.path.exists(target_path):
|
||||||
|
os.mkdirs(target_path)
|
||||||
|
|
||||||
pid = get_pid()
|
pid = get_pid()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue