mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
SIGKILL is not alwasy available use a local variable
This commit is contained in:
parent
4d6b8da5a0
commit
8fdb04df0d
1 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,6 @@
|
|||
# Import python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import signal
|
||||
import shutil
|
||||
import logging
|
||||
|
||||
|
@ -29,6 +28,9 @@ import salt.utils.platform
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
SIGKILL = 9
|
||||
|
||||
|
||||
class SyndicTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMixin):
|
||||
'''
|
||||
Test the salt-syndic command
|
||||
|
@ -72,7 +74,7 @@ class SyndicTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
|
|||
if os.path.exists(pid_path):
|
||||
with salt.utils.files.fopen(pid_path) as fhr:
|
||||
try:
|
||||
os.kill(int(fhr.read()), signal.SIGKILL)
|
||||
os.kill(int(fhr.read()), SIGKILL)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue