Merge pull request #30436 from jirikotlin/develop

Exception when analysed process is turned off during execution.
This commit is contained in:
Mike Place 2016-01-19 07:42:33 -07:00
commit add9bf1fd9

View File

@ -368,7 +368,11 @@ def restartcheck(ignorelist=None, blacklist=None, excludepid=None, verbose=True)
name, pid, path = deleted_file[0], deleted_file[1], deleted_file[2]
if path in blacklist or pid in excludepid:
continue
readlink = os.readlink('/proc/{0}/exe'.format(pid))
try:
readlink = os.readlink('/proc/{0}/exe'.format(pid))
except OSError:
excludepid.append(pid)
continue
try:
packagename = owners_cache[readlink]
except KeyError: