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

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



On discussion with Endi on IRC, the variable name is changed from vtype
to instanceType. (the actual warning was using built-in name 'type' for
a variable, which was changed to vtype, which is now changed to
instanceType). That change was also made to the instance attribute of
PKIInstance, which is now reverted back to type. 

Please review the patch and acknowledge for being able to push it to
master.
--Abhishek
On Wed, 2013-07-10 at 14:19 -0400, Abhishek Koneru wrote:
> Please review a fix for a bug found in code due to a fix in one of the
> patches fixing the pylint issues.
> 
> --Abhishek
> _______________________________________________
> Pki-devel mailing list
> Pki-devel redhat com
> https://www.redhat.com/mailman/listinfo/pki-devel

>From 9b83091ec85a2f0afaf2936ed6388b2ee53ef656 Mon Sep 17 00:00:00 2001
From: Abhishek Koneru <akoneru redhat com>
Date: Tue, 16 Jul 2013 17:52:12 -0400
Subject: [PATCH] Fix a defect in upgrade scripts.

A bug introduced in upgrade scripts while fixing pylint errors
and warnings are fixed.
---
 base/server/python/pki/server/__init__.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/base/server/python/pki/server/__init__.py b/base/server/python/pki/server/__init__.py
index fab695bdcb23cfceeefba69122c32917ca9f7866..eb1e4b81a0b799948a5c1c93bbfc653014209d85 100644
--- a/base/server/python/pki/server/__init__.py
+++ b/base/server/python/pki/server/__init__.py
@@ -59,10 +59,10 @@ class PKISubsystem(object):
 
 class PKIInstance(object):
 
-    def __init__(self, name, vtype=10):
+    def __init__(self, name, instanceType=10):
         self.name = name
-        self.vtype = vtype
-        if self.vtype >= 10:
+        self.type = instanceType
+        if self.type >= 10:
             self.conf_dir = os.path.join(INSTANCE_BASE_DIR, name, 'conf')
             self.base_dir = os.path.join(INSTANCE_BASE_DIR, name)
         else:
@@ -77,7 +77,7 @@ class PKIInstance(object):
                 'Invalid instance: ' + self.__repr__(), None)
 
     def __repr__(self):
-        if self.vtype == 9:
+        if self.type == 9:
             return "Dogtag 9 " + self.name
         return self.name
 
-- 
1.7.10.2


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