[node-patches] Change in ovirt-node[ovirt-3.6]: [rhn] Don't try to unpersist files unless they're persisted

fabiand at redhat.com fabiand at redhat.com
Mon Nov 23 17:13:20 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: [rhn] Don't try to unpersist files unless they're persisted
......................................................................

[rhn] Don't try to unpersist files unless they're persisted

Use Config().exists(), not os.path.exists(), which provides no
guarantees of whether it's persisted.

Change-Id: I16267d0d5ebd104fc85b174c7b86df3a2d4724d9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1275222
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/setup/rhn/rhn_model.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/32/49032/1

diff --git a/src/ovirt/node/setup/rhn/rhn_model.py b/src/ovirt/node/setup/rhn/rhn_model.py
index 7f478b4..250e19a 100755
--- a/src/ovirt/node/setup/rhn/rhn_model.py
+++ b/src/ovirt/node/setup/rhn/rhn_model.py
@@ -287,7 +287,7 @@
 
             def commit(self):
                 def scrub(f):
-                    if os.path.exists(f):
+                    if Config().exists(f):
                         Config().unpersist(f)
                         # Unlinking causes problems with satellite5. Why?
                         # os.unlink(f)


-- 
To view, visit https://gerrit.ovirt.org/49032
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16267d0d5ebd104fc85b174c7b86df3a2d4724d9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list