Hi All,

Please review the patch.

--
Thanks,
Abhijeet Kasurde

IRC: akasurde
http://akasurde.github.io

From 04cdf13525636add733e8c10525c0b48a4ef3c66 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde <[email protected]>
Date: Wed, 29 Jun 2016 14:44:45 +0530
Subject: [PATCH] Added condition to verify instance id in db-schema-upgrade

Fixes : https://bugzilla.redhat.com/show_bug.cgi?id=1351096

Signed-off-by: Abhijeet Kasurde <[email protected]>
---
 base/server/python/pki/server/cli/db.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/base/server/python/pki/server/cli/db.py b/base/server/python/pki/server/cli/db.py
index c643182b9d1fc93d5452e802c8da37724b341f48..f1e2b3437cbee5778db31aed0223c5eae8edeec7 100644
--- a/base/server/python/pki/server/cli/db.py
+++ b/base/server/python/pki/server/cli/db.py
@@ -95,7 +95,11 @@ class DBSchemaUpgrade(pki.cli.CLI):
                 sys.exit(1)
 
         instance = pki.server.PKIInstance(instance_name)
+        if not instance.is_valid():
+            print("ERROR: Instance name '%s' not found"  % instance)
+            sys.exit(1)
         instance.load()
+
         self.update_schema(instance, bind_dn, bind_password)
 
         self.print_message('Upgrade complete')
-- 
2.4.11

_______________________________________________
Pki-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pki-devel

Reply via email to