diff options
Diffstat (limited to 'azurelinuxagent/protocol/ovfenv.py')
-rw-r--r-- | azurelinuxagent/protocol/ovfenv.py | 11 |
1 files changed, 8 insertions, 3 deletions
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("<UserPassword>.*?<", "<UserPassword>*<", 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): |