summaryrefslogtreecommitdiff
path: root/python/ovs/daemon.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/ovs/daemon.py')
-rw-r--r--python/ovs/daemon.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py
index 3d46deb75..149c8a1d8 100644
--- a/python/ovs/daemon.py
+++ b/python/ovs/daemon.py
@@ -266,8 +266,7 @@ def _should_restart(status):
if os.WIFSIGNALED(status):
for signame in ("SIGABRT", "SIGALRM", "SIGBUS", "SIGFPE", "SIGILL",
"SIGPIPE", "SIGSEGV", "SIGXCPU", "SIGXFSZ"):
- if (signame in signal.__dict__ and
- os.WTERMSIG(status) == signal.__dict__[signame]):
+ if os.WTERMSIG(status) == getattr(signal, signame, None):
return True
return False