Merge "Retry the sfdisk command up to 3 times."

This commit is contained in:
Jenkins 2013-06-20 20:44:35 +00:00 committed by Gerrit Code Review
commit 52521961d3
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ def make_partitions(dev, root_mb, swap_mb):
stdin_command = ('1,%d,83;\n,%d,82;\n0,0;\n0,0;\n' % (root_mb, swap_mb))
utils.execute('sfdisk', '-uM', dev, process_input=stdin_command,
run_as_root=True,
attempts=3,
check_exit_code=[0])
# avoid "device is busy"
time.sleep(3)