Alon Bar-Lev has posted comments on this change.
Change subject: packaging: setup: Do not fail with missing /etc/sysconfig/nfs
......................................................................
Patch Set 1:
(1 comment)
....................................................
File packaging/setup/plugins/ovirt-engine-setup/system/nfs.py
Line 167: config = configfile.ConfigFile([
Line 168: osetupcons.FileLocations.OVIRT_NFS_RHEL_CONFIG
Line 169: ])
Line 170: changed_lines = []
Line 171: if os.path.exists(osetupcons.FileLocations.NFS_RHEL_CONFIG):
consider:
content = []
if os.path.exists():
with ...
content =
this removes conditional.
also... please remember the rule that shorter (void) statement first in
conditional, so:
if not os.path.exists():
content = []
else:
with ...
content =
but first is preferred.
Line 172: with open(osetupcons.FileLocations.NFS_RHEL_CONFIG, 'r')
as f:
Line 173: content = f.read().splitlines()
Line 174: else:
Line 175: content = []
--
To view, visit http://gerrit.ovirt.org/20402
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I62b22a12b9abd408657696caa8d34243ae521cbd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches