~mdw
/
hippotat
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cope with jesse's signal module (which lacks sig.name)
[hippotat]
/
hippotatd
diff --git
a/hippotatd
b/hippotatd
index
bc55650
..
212e5c4
100755
(executable)
--- 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):
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
def daemonise():
global syslogfacility