livemedia-creator: handle failed mount for ami

This commit is contained in:
Brian C. Lane 2012-05-22 13:11:53 -07:00
parent e7c3366745
commit 60644c7adc

View File

@ -364,6 +364,9 @@ def make_ami( disk_img, ami_img="ami-root.img", ami_label="AMI" ):
All other AMI setup is handled by the kickstart's %post
"""
with PartitionMount( disk_img ) as img_mount:
if not img_mount or not img_mount.mount_dir:
return None
work_dir = tempfile.mkdtemp()
log.info("working dir is {0}".format(work_dir))
log.info("creating {0}".format(ami_img))