[umount] Avoid SIGPIPE
- collect output from umount process, and then ignore it
This commit is contained in:
parent
e51fbdc851
commit
c59af8881c
@ -98,7 +98,9 @@ def run():
|
|||||||
lst.sort(key=lambda x: x[1], reverse=True)
|
lst.sort(key=lambda x: x[1], reverse=True)
|
||||||
|
|
||||||
for device, mount_point in lst:
|
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)
|
os.rmdir(root_mount_point)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user