Codebase list debian-goodies / 96ddaa0
checkrestart: Properly error-out when calling lsof fails Closes #880998 Nicolas Braud-Santoni 6 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
319319
320320 def lsoffilescheck(blacklist = None):
321321 # Use LSOF to extract the list of deleted files
322 from subprocess import check_output
322323 processes = {}
323324
324 for line in os.popen('lsof +XL -F nf').readlines():
325 for line in check_output(['lsof', '+XL', '-F', 'nf']).splitlines():
325326 field, data = line[0], line[1:-1]
326327
327328 if field == 'p':