mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
If we catch the pid file in a transistory state, return None
This commit is contained in:
parent
5d5b22021b
commit
5e930b8cbd
1 changed files with 4 additions and 2 deletions
|
@ -130,8 +130,10 @@ def get_pidfile(pidfile):
|
|||
'''
|
||||
with salt.utils.fopen(pidfile) as pdf:
|
||||
pid = pdf.read()
|
||||
|
||||
return int(pid)
|
||||
if pid:
|
||||
return int(pid)
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
def clean_proc(proc, wait_for_kill=10):
|
||||
|
|
Loading…
Add table
Reference in a new issue