Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: engine_page: double check to unpersist the file
......................................................................

engine_page: double check to unpersist the file

Make sure the file really exists before unpersist it.

Change-Id: I24508ec5dd4308c0c3ba4144e120af66fe346f2c
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
M src/engine_page.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm 
refs/changes/82/36582/1

diff --git a/src/engine_page.py b/src/engine_page.py
index f9c9fdb..40320ec 100644
--- a/src/engine_page.py
+++ b/src/engine_page.py
@@ -293,8 +293,9 @@
 
         elif changes.contains_any(["action.cert.reject"]):
             model.update(cert_path=None)
-            utils.fs.Config().unpersist(self._cert_path)
-            if self._cert_path is not None:
+            if self._cert_path is not None and \
+                    os.path.exists(self._cert_path):
+                utils.fs.Config().unpersist(self._cert_path)
                 os.unlink(self._cert_path)
             self._fp_dialog.close()
             self._server, self._port, self._cert_path = None, None, None


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24508ec5dd4308c0c3ba4144e120af66fe346f2c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-plugin-vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to