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

[Pki-devel] [PATCH] 68 Fix for a bug raised due to a fix for pylint warning in upgrade scripts



Please review a fix for a bug found in code due to a fix in one of the
patches fixing the pylint issues.

--Abhishek
>From 4c8a27ef3a70d72abad2a25f4a284d5264842831 Mon Sep 17 00:00:00 2001
From: Abhishek Koneru <akoneru redhat com>
Date: Wed, 10 Jul 2013 11:47:13 -0400
Subject: [PATCH] Fix a bug raised in upgrade scripts.

A new defect caused due to changing the 'type' attributre to 'vtype'
of PKIInstance in upgrade scripts. Fixed the issue.
---
 base/server/python/pki/server/__init__.py |    2 +-
 base/server/python/pki/server/upgrade.py  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/base/server/python/pki/server/__init__.py b/base/server/python/pki/server/__init__.py
index fab695bdcb23cfceeefba69122c32917ca9f7866..61d9cc4b609f70ad059b5d400c6492c1599f93ae 100644
--- a/base/server/python/pki/server/__init__.py
+++ b/base/server/python/pki/server/__init__.py
@@ -34,7 +34,7 @@ class PKISubsystem(object):
     def __init__(self, instance, subsystemName):
         self.instance = instance
         self.name = subsystemName
-        self.type = instance.type
+        self.type = instance.vtype
         if self.type >= 10:
             self.conf_dir = os.path.join(INSTANCE_BASE_DIR, \
                 instance.name, 'conf', subsystemName)
diff --git a/base/server/python/pki/server/upgrade.py b/base/server/python/pki/server/upgrade.py
index 4afa5a72fbaabd8dea6489b73b6da65a3b918b82..ec8b6e641f574eae69ae910d59c1ce241ef0502c 100644
--- a/base/server/python/pki/server/upgrade.py
+++ b/base/server/python/pki/server/upgrade.py
@@ -196,7 +196,7 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
 
         subsystem_list = []
 
-        if instance.type >= 10:
+        if instance.vtype >= 10:
             registry_dir = os.path.join(pki.server.REGISTRY_DIR, 'tomcat',
                 instance.name)
             for subsystemName in os.listdir(registry_dir):
-- 
1.7.10.2


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