mirror of
https://github.com/flatcar/scripts.git
synced 2026-04-28 00:41:24 +02:00
build_library: detach only if loop_dev exists
This commit is contained in:
parent
5bc76098a5
commit
06027d670f
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user