Yedidyah Bar David has uploaded a new change for review. Change subject: packaging: setup: Do not fail with missing /etc/sysconfig/nfs ......................................................................
packaging: setup: Do not fail with missing /etc/sysconfig/nfs Make engine-setup do not fail if /etc/sysconfig/nfs does not exist, instead behave as if it was empty. engine-cleanup leaves it behind empty. Bug-Url: https://bugzilla.redhat.com/1021867 Change-Id: I62b22a12b9abd408657696caa8d34243ae521cbd Signed-off-by: Yedidyah Bar David <[email protected]> --- M packaging/setup/plugins/ovirt-engine-setup/system/nfs.py 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/83/20483/1 diff --git a/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py b/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py index ea72ffa..d95036b 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py +++ b/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py @@ -21,6 +21,7 @@ """ +import os import platform import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup') @@ -167,8 +168,10 @@ osetupcons.FileLocations.OVIRT_NFS_RHEL_CONFIG ]) changed_lines = [] - with open(osetupcons.FileLocations.NFS_RHEL_CONFIG, 'r') as f: - content = f.read().splitlines() + content = [] + if os.path.exists(osetupcons.FileLocations.NFS_RHEL_CONFIG): + with open(osetupcons.FileLocations.NFS_RHEL_CONFIG, 'r') as f: + content = f.read().splitlines() self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( filetransaction.FileTransaction( name=osetupcons.FileLocations.NFS_RHEL_CONFIG, -- To view, visit http://gerrit.ovirt.org/20483 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I62b22a12b9abd408657696caa8d34243ae521cbd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.3 Gerrit-Owner: Yedidyah Bar David <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
