Don't crash because of missing SIGHUP on Windows

Fix #229.
This commit is contained in:
Guillaume Ayoub 2014-11-03 11:21:12 +01:00
parent 9d94d3a329
commit ea97c014b7

View File

@ -52,7 +52,8 @@ def start():
if os.path.exists(filename):
# Configuration taken from file
configure_from_file(filename, debug)
# Reload config on SIGHUP
# Reload config on SIGHUP (UNIX only)
if hasattr(signal, 'SIGHUP'):
def handler(signum, frame):
configure_from_file(filename, debug)
signal.signal(signal.SIGHUP, handler)