From 06027d670f47a68360e11fa79ba3e2d729d8ab63 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Sat, 29 Jun 2019 16:23:09 +0200 Subject: [PATCH] build_library: detach only if loop_dev exists --- build_library/disk_util | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_library/disk_util b/build_library/disk_util index aa7743a5c9..eeb6d53ab7 100755 --- a/build_library/disk_util +++ b/build_library/disk_util @@ -446,7 +446,8 @@ def PartitionLoop(options, partition): loop_dev = loop_dev.strip() break except: - Sudo(['losetup', '--detach', loop_dev]) + if loop_dev: + Sudo(['losetup', '--detach', loop_dev]) attempts += 1 time.sleep(1)