Code review comment for lp:~salgado/linaro-image-tools/partition-setup

Revision history for this message
Martin Ohlsson (martin-ohlson) wrote :

> === modified file 'media_create/create_partitions.py'
> --- media_create/create_partitions.py 2010-12-09 19:58:24 +0000
> +++ media_create/create_partitions.py 2010-12-13 14:51:10 +0000
>
> cmd_runner.run(
> - ['parted', '-s', device, 'mklabel', 'msdos'], as_root=True)
> + ['parted', '-s', media.path, 'mklabel', 'msdos'], as_root=True)
> + # It sems to be necessary to sleep a bit here to avoid a race
> + # condition with the sfdisk commands executed below. Try removing it
> + # and running the integration tests to see how it fails.
> + time.sleep(0.5)

Isn't it possible to wait() for the parted command to finish?

/Martin

« Back to merge proposal