Sandro Bonazzola has uploaded a new change for review. Change subject: ovf: allow empty image description ......................................................................
ovf: allow empty image description Change-Id: I05558503bcbe99d7b35087da5703c0dd5655944f Bug-Url: https://bugzilla.redhat.com/1147468 Signed-off-by: Sandro Bonazzola <[email protected]> (cherry picked from commit e2189302509bd2058160a8ccdd5b9b4a2e6b82b0) --- M src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py 1 file changed, 13 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/36/33536/1 diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py b/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py index a8e93b0..b40af8d 100644 --- a/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py +++ b/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py @@ -249,11 +249,19 @@ ] = int( disk.attrib['{http://schemas.dmtf.org/ovf/envelope/1/}size'] ) - self.environment[ - ohostedcons.StorageEnv.IMAGE_DESC - ] = disk.attrib[ - '{http://schemas.dmtf.org/ovf/envelope/1/}disk-alias' - ] + try: + self.environment[ + ohostedcons.StorageEnv.IMAGE_DESC + ] = disk.attrib[ + '{http://schemas.dmtf.org/ovf/envelope/1/}disk-alias' + ] + except KeyError: + self.logger.warning( + _( + 'OVF does not contain a valid image description, ' + 'using default.' + ) + ) self._source_image = os.path.join( 'images', disk.attrib[ -- To view, visit http://gerrit.ovirt.org/33536 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05558503bcbe99d7b35087da5703c0dd5655944f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: ovirt-hosted-engine-setup-1.2 Gerrit-Owner: Sandro Bonazzola <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
