Fix SIGHUP handler
The function handler_generator seems useless and the return statement is missing.
This commit is contained in:
parent
3b71ab960e
commit
de8c2f0909
@ -46,10 +46,8 @@ def start(name="radicale", filename=None, debug=False):
|
|||||||
configure_from_file(logger, filename, debug)
|
configure_from_file(logger, filename, debug)
|
||||||
# Reload config on SIGHUP (UNIX only)
|
# Reload config on SIGHUP (UNIX only)
|
||||||
if hasattr(signal, "SIGHUP"):
|
if hasattr(signal, "SIGHUP"):
|
||||||
def handler_generator(logger, filename, debug):
|
|
||||||
def handler(signum, frame):
|
def handler(signum, frame):
|
||||||
configure_from_file(logger, filename, debug)
|
configure_from_file(logger, filename, debug)
|
||||||
handler = handler_generator(logger, filename, debug)
|
|
||||||
signal.signal(signal.SIGHUP, handler)
|
signal.signal(signal.SIGHUP, handler)
|
||||||
else:
|
else:
|
||||||
# Default configuration, standard output
|
# Default configuration, standard output
|
||||||
|
Loading…
Reference in New Issue
Block a user