X-Git-Url: https://git.distorted.org.uk/~mdw/hippotat/blobdiff_plain/1d33eef34159fefbafbade2c09ead1c5c23ff32c..56afc4872ae3183df5bdaaea2c50089f6e3db19c:/hippotatd diff --git a/hippotatd b/hippotatd index bc55650..212e5c4 100755 --- a/hippotatd +++ b/hippotatd @@ -346,7 +346,9 @@ def catch_termination(): raise RuntimeError('did not die due to signal %s !' % name) for sig in (signal.SIGINT, signal.SIGTERM): - signal.signal(sig, partial(signal_handler, sig.name)) + try: signame = sig.name + except AttributeError: signame = "signal %d" % sig + signal.signal(sig, partial(signal_handler, signame)) def daemonise(): global syslogfacility