Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: engine-setup avoid traceback when loading iso ......................................................................
packaging: engine-setup avoid traceback when loading iso In engine-setup, _loadFilesToIsoDomain now try to copy the iso files provided by possibly installed rpm into the configured ISO domain only if they exists avoiding useless traceback in the log. Change-Id: Ic995c3bee295b964d2f6a729e4d4fb750eb6b4b5 Bug-Url: https://bugzilla.redhat.com/904763 Signed-off-by: Sandro Bonazzola <[email protected]> --- M packaging/fedora/setup/engine-setup.py 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/07/12207/1 diff --git a/packaging/fedora/setup/engine-setup.py b/packaging/fedora/setup/engine-setup.py index 4ff27d2..adfe832 100755 --- a/packaging/fedora/setup/engine-setup.py +++ b/packaging/fedora/setup/engine-setup.py @@ -1836,6 +1836,7 @@ logging.error(traceback.format_exc()) raise Exception(output_messages.ERR_FAILED_TO_START_NFS_SERVICE) + def _loadFilesToIsoDomain(): """ Load files (iso,vfd) from existing rpms @@ -1848,14 +1849,18 @@ targetPath = os.path.join(controller.CONF["NFS_MP"], controller.CONF["sd_uuid"], "images", "11111111-1111-1111-1111-111111111111") try: - # Iterate the list and copy all the files + # Iterate the list and copy all the files if they exists. for filename in fileList: - utils.copyFile(filename, targetPath, basedefs.CONST_VDSM_UID, basedefs.CONST_KVM_GID) - except: + if os.path.exists(filename): + utils.copyFile(filename, targetPath, basedefs.CONST_VDSM_UID, + basedefs.CONST_KVM_GID + ) + except Exception: # We don't want to fail the setup, just log the error logging.error(traceback.format_exc()) logging.error(output_messages.ERR_FAILED_TO_COPY_FILE_TO_ISO_DOMAIN) + def _printAdditionalMessages(): print "\n",output_messages.INFO_ADDTIONAL_MSG for msg in controller.MESSAGES: -- To view, visit http://gerrit.ovirt.org/12207 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic995c3bee295b964d2f6a729e4d4fb750eb6b4b5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
