checkrestart: Properly error-out when calling lsof fails
Closes #880998
Nicolas Braud-Santoni
6 years ago
319 | 319 | |
320 | 320 | def lsoffilescheck(blacklist = None): |
321 | 321 | # Use LSOF to extract the list of deleted files |
322 | from subprocess import check_output | |
322 | 323 | processes = {} |
323 | 324 | |
324 | for line in os.popen('lsof +XL -F nf').readlines(): | |
325 | for line in check_output(['lsof', '+XL', '-F', 'nf']).splitlines(): | |
325 | 326 | field, data = line[0], line[1:-1] |
326 | 327 | |
327 | 328 | if field == 'p': |