[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 929 Fixed MergePKIWebapps upgrade script.



The MergePKIWebapps upgrade script has been modified to ensure
that the old deployment descriptors exist before deleting them.

https://fedorahosted.org/pki/ticket/2582

Pushed to master under trivial rule.

--
Endi S. Dewata
>From eb10e1afecb13784501a2e9d6cf2aec19c8a45c2 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata redhat com>
Date: Wed, 1 Feb 2017 03:42:26 +0100
Subject: [PATCH] Fixed MergePKIWebapps upgrade script.

The MergePKIWebapps upgrade script has been modified to ensure
that the old deployment descriptors exist before deleting them.

https://fedorahosted.org/pki/ticket/2582
---
 base/server/upgrade/10.4.0/02-MergePKIWebapps | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/base/server/upgrade/10.4.0/02-MergePKIWebapps b/base/server/upgrade/10.4.0/02-MergePKIWebapps
index 4bd3deeeed64d0718a3867c19a3f12a48f258ffc..60d42c006556d0e43dd4467497939c8760f6f619 100755
--- a/base/server/upgrade/10.4.0/02-MergePKIWebapps
+++ b/base/server/upgrade/10.4.0/02-MergePKIWebapps
@@ -43,10 +43,11 @@ class MergePKIWebapps(
             'localhost',
             'pki#admin.xml')
 
-        self.backup(pki_admin_xml)
-        os.remove(pki_admin_xml)
+        if os.path.exists(pki_admin_xml):
+            self.backup(pki_admin_xml)
+            os.remove(pki_admin_xml)
 
-        # undeploy /pki/admin webapp
+        # undeploy /pki/js webapp
 
         pki_js_xml = os.path.join(
             instance.conf_dir,
@@ -54,8 +55,9 @@ class MergePKIWebapps(
             'localhost',
             'pki#js.xml')
 
-        self.backup(pki_js_xml)
-        os.remove(pki_js_xml)
+        if os.path.exists(pki_js_xml):
+            self.backup(pki_js_xml)
+            os.remove(pki_js_xml)
 
         # deploy /pki webapp (which includes /pki/admin and /pki/js)
 
-- 
2.5.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]