diff options
author | Harm Weites <harm@weites.com> | 2013-12-14 22:30:29 +0000 |
---|---|---|
committer | Harm Weites <harm@weites.com> | 2013-12-14 22:30:29 +0000 |
commit | 76756d5985cac6d0d8eafbbc336dc140cb3ecb1d (patch) | |
tree | 5cb15d579bf7b6c251d64736c59ab81f097246e0 /cloudinit/config | |
parent | 8a2b80adfb66f9036dc617ff65b7f6ab4464ca5d (diff) | |
download | vyos-cloud-init-76756d5985cac6d0d8eafbbc336dc140cb3ecb1d.tar.gz vyos-cloud-init-76756d5985cac6d0d8eafbbc336dc140cb3ecb1d.zip |
change: Use a proper signal instead of 'just' 0.
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_power_state_change.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/config/cc_power_state_change.py b/cloudinit/config/cc_power_state_change.py index 8efef24b..2797b3d9 100644 --- a/cloudinit/config/cc_power_state_change.py +++ b/cloudinit/config/cc_power_state_change.py @@ -22,6 +22,7 @@ from cloudinit import util import errno import os import re +import signal import subprocess import time @@ -36,7 +37,7 @@ EXIT_FAIL = 254 def givecmdline(pid): # Check if this pid still exists by sending it the harmless 0 signal. try: - os.kill(pid, 0) + os.kill(pid, signal.SIG_DFL) except OSError: return None else: |