[node-patches] Change in ovirt-node[master]: don't wipe out existing /etc/hosts entries

mburns at redhat.com mburns at redhat.com
Tue Feb 5 21:29:54 UTC 2013


Michael Burns has uploaded a new change for review.

Change subject: don't wipe out existing /etc/hosts entries
......................................................................

don't wipe out existing /etc/hosts entries

logic was backwards in the check

rhbz#878540

Change-Id: I22073eb7e7b413c58db4fcbb0e918edfcdb47d33
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M scripts/ovirtnode/ovirtfunctions.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/71/11771/1

diff --git a/scripts/ovirtnode/ovirtfunctions.py b/scripts/ovirtnode/ovirtfunctions.py
index 09e98b7..9e5d038 100644
--- a/scripts/ovirtnode/ovirtfunctions.py
+++ b/scripts/ovirtnode/ovirtfunctions.py
@@ -1632,7 +1632,7 @@
 
 def create_minimal_etc_hosts_file():
     filename = "/etc/hosts"
-    if open(filename, "r").read().strip() == "":
+    if not open(filename, "r").read().strip() == "":
         logger.info("Won't update %s, it's not empty." % filename)
         return
     if not is_persisted(filename):


--
To view, visit http://gerrit.ovirt.org/11771
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22073eb7e7b413c58db4fcbb0e918edfcdb47d33
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>



More information about the node-patches mailing list