mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Switch open()
for salt.utils.fopen()
This commit is contained in:
parent
1857a0d31f
commit
bea345e720
@ -61,10 +61,11 @@ class MasterTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
||||
|
||||
# Now kill it if still running
|
||||
if os.path.exists(pid_path):
|
||||
try:
|
||||
os.kill(int(open(pid_path).read()), signal.SIGKILL)
|
||||
except OSError:
|
||||
pass
|
||||
with salt.utils.fopen(pid_path) as fhr:
|
||||
try:
|
||||
os.kill(int(fhr.read()), signal.SIGKILL)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
self.assertFalse(os.path.isdir(os.path.join(config_dir, 'file:')))
|
||||
self.assertIn(
|
||||
|
Loading…
Reference in New Issue
Block a user