From 83432149e212155469b1e9f06eb0095121377356 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Mon, 7 Dec 2015 16:48:51 -0700 Subject: Import patches-unapplied version 2.1.2-0ubuntu1 to ubuntu/xenial-proposed Imported using git-ubuntu import. Changelog parent: 04946cba49f19c0b6b876bccdbb36d47334af002 New changelog entries: * New upstream release (LP: #1523715): - Bug fixes for Ubuntu 15.10 on Azure - Enablement for Azure Stack - Dropped patch for systemd job as upstream now includes it. --- azurelinuxagent/protocol/ovfenv.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'azurelinuxagent/protocol/ovfenv.py') diff --git a/azurelinuxagent/protocol/ovfenv.py b/azurelinuxagent/protocol/ovfenv.py index 2e0411d..9c845ee 100644 --- a/azurelinuxagent/protocol/ovfenv.py +++ b/azurelinuxagent/protocol/ovfenv.py @@ -1,4 +1,4 @@ -# Windows Azure Linux Agent +# Microsoft Azure Linux Agent # # Copyright 2014 Microsoft Corporation # @@ -58,12 +58,17 @@ def copy_ovf_env(): ovfxml = re.sub(".*?<", "*<", ovfxml) ovf_file_path = os.path.join(OSUTIL.get_lib_dir(), OVF_FILE_NAME) fileutil.write_file(ovf_file_path, ovfxml) - OSUTIL.umount_dvd() - OSUTIL.eject_dvd() except IOError as e: raise ProtocolError(text(e)) except OSUtilError as e: raise ProtocolError(text(e)) + + try: + OSUTIL.umount_dvd() + OSUTIL.eject_dvd() + except OSUtilError as e: + logger.warn(text(e)) + return ovfenv def _validate_ovf(val, msg): -- cgit v1.2.3