mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Catch read_proc_file exceptions
This commit is contained in:
parent
cc1f9a4aab
commit
bd0d1306fd
1 changed files with 8 additions and 1 deletions
|
@ -64,7 +64,14 @@ def clean_proc_dir(opts):
|
|||
proc_dir = os.path.join(opts["cachedir"], "proc")
|
||||
for fn_ in os.listdir(proc_dir):
|
||||
proc_file = os.path.join(proc_dir, fn_)
|
||||
data = _read_proc_file(proc_file, opts)
|
||||
try:
|
||||
data = _read_proc_file(proc_file, opts)
|
||||
except OSError:
|
||||
# proc files may be removed at any time during this process by
|
||||
# the master process that is executing the JID in question, so
|
||||
# we must ignore ENOENT during this process
|
||||
log.trace("%s removed during processing by master process", proc_file)
|
||||
continue
|
||||
if not data:
|
||||
try:
|
||||
log.warning(
|
||||
|
|
Loading…
Add table
Reference in a new issue