preexisting directory does not crash the program

This commit is contained in:
Joachim Lusiardi 2014-12-27 20:53:19 +01:00
parent 476635219b
commit 00bba345f9
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ def handle_event(event):
print('HUPing nginx')
os.kill(pid, signal.SIGHUP)
os.mkdir(target_path)
if not os.path.exists(target_path):
os.mkdirs(target_path)
pid = get_pid()