[umount] Avoid SIGPIPE

- collect output from umount process, and then ignore it
main
Adriaan de Groot 5 years ago
parent e51fbdc851
commit c59af8881c

@ -98,7 +98,9 @@ def run():
lst.sort(key=lambda x: x[1], reverse=True)
for device, mount_point in lst:
subprocess.check_call(["umount", "-lv", mount_point])
# On success, no output; if the command fails, its output is
# in the exception object.
subprocess.check_output(["umount", "-lv", mount_point], stderr=subprocess.STDOUT)
os.rmdir(root_mount_point)

Loading…
Cancel
Save