build_library: detach only if loop_dev exists

This commit is contained in:
Dongsu Park 2019-06-29 16:23:09 +02:00
parent 5bc76098a5
commit 06027d670f

View File

@ -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)