Switch open() for salt.utils.fopen()

This commit is contained in:
Pedro Algarvio 2014-11-26 23:35:31 +00:00
parent 1857a0d31f
commit bea345e720

View File

@ -61,8 +61,9 @@ class MasterTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
# Now kill it if still running
if os.path.exists(pid_path):
with salt.utils.fopen(pid_path) as fhr:
try:
os.kill(int(open(pid_path).read()), signal.SIGKILL)
os.kill(int(fhr.read()), signal.SIGKILL)
except OSError:
pass
try: