From cf304f6f1be9429c3f6ac5aebcf902448d0c5149 Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes@redhat.com>
Date: Mon, 15 Jun 2015 17:22:09 +0200
Subject: [PATCH] Run pylint on upgrade scripts

pylint-build-scan.sh doesn't checked the upgrader's Python files yet.
This patch adds the common and server upgrade scripts to
pylint-build-scan.sh. It also fixes a couple of pylint violations,
mostly missing calls to __init__().
---
 base/common/upgrade/10.0.1/01-AddJniJarDir                        | 8 ++++----
 base/common/upgrade/10.0.3/01-RemoveJniJarDir                     | 8 ++++----
 base/server/upgrade/10.0.1/01-ReplaceRandomNumberGenerator        | 4 +---
 base/server/upgrade/10.0.1/02-CloningInterfaceChanges             | 5 +++--
 base/server/upgrade/10.0.1/03-AddRestServlet                      | 5 +++--
 base/server/upgrade/10.0.5/01-EnableSessionInAuthenticator        | 3 +--
 base/server/upgrade/10.0.99/01-FixJavaOpts                        | 2 +-
 base/server/upgrade/10.0.99/02-RemoveAuthProperties               | 1 +
 base/server/upgrade/10.0.99/03-FixRegistryFile                    | 1 +
 base/server/upgrade/10.0.99/04-FixLogFileOwnership                | 1 +
 base/server/upgrade/10.1.1/01-MoveWebApplicationContextFile       | 2 +-
 base/server/upgrade/10.1.99/01-MoveWebApplicationContextFile      | 2 +-
 base/server/upgrade/10.1.99/02-ReplaceJettisonWithJackson         | 2 +-
 base/server/upgrade/10.1.99/03-AddedRESTEasyClient                | 2 +-
 base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass    | 3 +--
 base/server/upgrade/10.1.99/05-RemoveConfigPathFromWebXML         | 2 +-
 base/server/upgrade/10.2.1/01-AddTLSRangeSupport                  | 2 +-
 .../upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations       | 6 ++----
 base/server/upgrade/10.2.2/02-EnableWebApplicationAutoDeploy      | 7 +------
 base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2          | 2 +-
 base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership      | 6 +++---
 base/server/upgrade/10.2.3/02-FixBindPWPrompt                     | 1 +
 .../upgrade/10.2.4/01-AddMissingOCSPGETServletMappingToWebXML     | 6 ++++--
 pylint-build-scan.sh                                              | 6 +++++-
 24 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/base/common/upgrade/10.0.1/01-AddJniJarDir b/base/common/upgrade/10.0.1/01-AddJniJarDir
index 58b634f7fc0a9110082181b22bae2f782560fcdc..1419eb9e5c7bbe3789961dfe8ea3dc78eb7d2f1d 100755
--- a/base/common/upgrade/10.0.1/01-AddJniJarDir
+++ b/base/common/upgrade/10.0.1/01-AddJniJarDir
@@ -28,7 +28,7 @@ import pki.upgrade
 class AddJniJarDir(pki.upgrade.PKIUpgradeScriptlet):
 
     def __init__(self):
-
+        super(AddJniJarDir, self).__init__()
         self.message = 'Add JNI_JAR_DIR into pki.conf'
 
     def upgrade_system(self):
@@ -40,11 +40,11 @@ class AddJniJarDir(pki.upgrade.PKIUpgradeScriptlet):
 
         default_path = default_conf.get('JNI_JAR_DIR')
 
-        file = os.path.join(pki.CONF_DIR, 'pki.conf')
-        self.backup(file)
+        filename = os.path.join(pki.CONF_DIR, 'pki.conf')
+        self.backup(filename)
 
         # read pki.conf
-        conf = pki.PropertyFile(file)
+        conf = pki.PropertyFile(filename)
         conf.read()
 
         # find JNI_JAR_DIR
diff --git a/base/common/upgrade/10.0.3/01-RemoveJniJarDir b/base/common/upgrade/10.0.3/01-RemoveJniJarDir
index 4efbfc6b6f889a046dc66720f11740595c0bcfda..86ff54a6062e660e9655b38d4d3c577893646e47 100755
--- a/base/common/upgrade/10.0.3/01-RemoveJniJarDir
+++ b/base/common/upgrade/10.0.3/01-RemoveJniJarDir
@@ -28,16 +28,16 @@ import pki.upgrade
 class RemoveJniJarDir(pki.upgrade.PKIUpgradeScriptlet):
 
     def __init__(self):
-
+        super(RemoveJniJarDir, self).__init__()
         self.message = 'Remove JNI_JAR_DIR from /etc/pki/pki.conf'
 
     def upgrade_system(self):
 
-        file = os.path.join(pki.CONF_DIR, 'pki.conf')
-        self.backup(file)
+        filename = os.path.join(pki.CONF_DIR, 'pki.conf')
+        self.backup(filename)
 
         # read pki.conf
-        conf = pki.PropertyFile(file)
+        conf = pki.PropertyFile(filename)
         conf.read()
 
         self.update_system_config(conf)
diff --git a/base/server/upgrade/10.0.1/01-ReplaceRandomNumberGenerator b/base/server/upgrade/10.0.1/01-ReplaceRandomNumberGenerator
index 01614d56ae6b62c3bc64ea7cb2e3ca813c8e1bb8..5cf4e581b7fe96c8ffcf80832f79a2b6162919f6 100755
--- a/base/server/upgrade/10.0.1/01-ReplaceRandomNumberGenerator
+++ b/base/server/upgrade/10.0.1/01-ReplaceRandomNumberGenerator
@@ -21,8 +21,6 @@
 
 import os
 import shutil
-import signal
-import sys
 from lxml import etree
 
 import pki
@@ -32,7 +30,7 @@ import pki.server.upgrade
 class ReplaceRandomNumberGenerator(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(ReplaceRandomNumberGenerator, self).__init__()
         self.message = 'Replace random number generator'
 
         self.context_xml = '/usr/share/pki/%s/webapps/%s/META-INF/context.xml'
diff --git a/base/server/upgrade/10.0.1/02-CloningInterfaceChanges b/base/server/upgrade/10.0.1/02-CloningInterfaceChanges
index c70a4263ce610be626d62b264c7bbcb19dbe57ff..5960f1d2dcd534def8b005d8d2b0173e4382dad9 100755
--- a/base/server/upgrade/10.0.1/02-CloningInterfaceChanges
+++ b/base/server/upgrade/10.0.1/02-CloningInterfaceChanges
@@ -20,7 +20,6 @@
 #
 
 import os
-import sys
 from lxml import etree as ET
 
 import pki
@@ -97,8 +96,10 @@ class CloningInterfaceChanges(pki.server.upgrade.PKIServerUpgradeScriptlet):
         </servlet-mapping>"""
 
     def __init__(self):
-
+        super(CloningInterfaceChanges, self).__init__()
         self.message = 'Change interfaces for cloning'
+        self.doc = None
+        self.root = None
 
     def upgrade_subsystem(self, instance, subsystem):
         web_xml = os.path.join(
diff --git a/base/server/upgrade/10.0.1/03-AddRestServlet b/base/server/upgrade/10.0.1/03-AddRestServlet
index 37304e29448555269b583cdda79abb6f49503205..2f375cd42408133212095baeeb3e9d58011b4e22 100755
--- a/base/server/upgrade/10.0.1/03-AddRestServlet
+++ b/base/server/upgrade/10.0.1/03-AddRestServlet
@@ -20,7 +20,6 @@
 #
 
 import os
-import sys
 from lxml import etree as ET
 
 import pki
@@ -41,8 +40,10 @@ class AddRestServlet(pki.server.upgrade.PKIServerUpgradeScriptlet):
         </servlet-mapping> """
 
     def __init__(self):
-
+        super(AddRestServlet, self).__init__()
         self.message = 'Add dummy REST servlet to upgraded Dogtag 9 instances'
+        self.doc = None
+        self.root = None
 
     def upgrade_subsystem(self, instance, subsystem):
         if subsystem.type >= 10:
diff --git a/base/server/upgrade/10.0.5/01-EnableSessionInAuthenticator b/base/server/upgrade/10.0.5/01-EnableSessionInAuthenticator
index 7aee78089c0c7fb75bd135c17b21e97ebb25a831..fe954c662b00a9d4bfa71ee97f6a66111b0838e5 100755
--- a/base/server/upgrade/10.0.5/01-EnableSessionInAuthenticator
+++ b/base/server/upgrade/10.0.5/01-EnableSessionInAuthenticator
@@ -28,9 +28,8 @@ import pki.server.upgrade
 class EnableSessionInAuthenticator(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(EnableSessionInAuthenticator, self).__init__()
         self.message = 'Enable session in authenticator'
-
         self.parser = etree.XMLParser(remove_blank_text=True)
 
     def upgrade_subsystem(self, instance, subsystem):
diff --git a/base/server/upgrade/10.0.99/01-FixJavaOpts b/base/server/upgrade/10.0.99/01-FixJavaOpts
index d89f7b425566bfc53069b8f225e46f6eee7b43c9..da2ece18a6ac3450d60041772714d6901e3ceab1 100755
--- a/base/server/upgrade/10.0.99/01-FixJavaOpts
+++ b/base/server/upgrade/10.0.99/01-FixJavaOpts
@@ -19,7 +19,6 @@
 # All rights reserved.
 #
 
-import os
 import re
 import pki.server.upgrade
 
@@ -27,6 +26,7 @@ import pki.server.upgrade
 class FixJavaOpts(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
+        super(FixJavaOpts, self).__init__()
         self.message = 'Fix JAVA_OPTS in tomcat startup'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.0.99/02-RemoveAuthProperties b/base/server/upgrade/10.0.99/02-RemoveAuthProperties
index 83719fc7599ff1882a7ab284dfcf396bd7ee3395..b5894fafeab7dc7d9ebc6e9762a3a7641c5b0f61 100755
--- a/base/server/upgrade/10.0.99/02-RemoveAuthProperties
+++ b/base/server/upgrade/10.0.99/02-RemoveAuthProperties
@@ -27,6 +27,7 @@ import pki.server.upgrade
 class RemoveAuthProperties(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
+        super(RemoveAuthProperties, self).__init__()
         self.message = 'Remove auth.properties'
 
     def upgrade_subsystem(self, instance, subsystem):
diff --git a/base/server/upgrade/10.0.99/03-FixRegistryFile b/base/server/upgrade/10.0.99/03-FixRegistryFile
index 7940e7c460523fc4fc86c5fe03759a856db8a957..ae417578a3926d6ad42b10b34923249713b86ccb 100755
--- a/base/server/upgrade/10.0.99/03-FixRegistryFile
+++ b/base/server/upgrade/10.0.99/03-FixRegistryFile
@@ -28,6 +28,7 @@ import pki.server.upgrade
 class FixRegistryFile(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
+        super(FixRegistryFile, self).__init__()
         self.message = 'Replace PKI_INSTANCE_ID and fix registry file ownership'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.0.99/04-FixLogFileOwnership b/base/server/upgrade/10.0.99/04-FixLogFileOwnership
index e4cb93437f6cfea0495e0e7fffe0ed57c4aadda9..964d50b7d7660b9ead11481bf4dd0239c4157b16 100755
--- a/base/server/upgrade/10.0.99/04-FixLogFileOwnership
+++ b/base/server/upgrade/10.0.99/04-FixLogFileOwnership
@@ -26,6 +26,7 @@ import pki.server.upgrade
 class FixLogFileOwnership(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
+        super(FixLogFileOwnership, self).__init__()
         self.message = 'Fix log file ownership'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.1.1/01-MoveWebApplicationContextFile b/base/server/upgrade/10.1.1/01-MoveWebApplicationContextFile
index d2526c5310f117b65fdb79308dcb068aee44aeef..76dbb23d6127048d7e173ca0dfe7ccb7cc1eb8da 100755
--- a/base/server/upgrade/10.1.1/01-MoveWebApplicationContextFile
+++ b/base/server/upgrade/10.1.1/01-MoveWebApplicationContextFile
@@ -27,7 +27,7 @@ import pki.server.upgrade
 class MoveWebApplicationContextFile(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(MoveWebApplicationContextFile, self).__init__()
         self.message = 'Move web application context file'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.1.99/01-MoveWebApplicationContextFile b/base/server/upgrade/10.1.99/01-MoveWebApplicationContextFile
index d2526c5310f117b65fdb79308dcb068aee44aeef..76dbb23d6127048d7e173ca0dfe7ccb7cc1eb8da 100755
--- a/base/server/upgrade/10.1.99/01-MoveWebApplicationContextFile
+++ b/base/server/upgrade/10.1.99/01-MoveWebApplicationContextFile
@@ -27,7 +27,7 @@ import pki.server.upgrade
 class MoveWebApplicationContextFile(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(MoveWebApplicationContextFile, self).__init__()
         self.message = 'Move web application context file'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.1.99/02-ReplaceJettisonWithJackson b/base/server/upgrade/10.1.99/02-ReplaceJettisonWithJackson
index e39acb0e02086bbbf56dfb6613016a88175abee9..b74f9d3ee9812e36377d21dbaf6a971420d72ffd 100755
--- a/base/server/upgrade/10.1.99/02-ReplaceJettisonWithJackson
+++ b/base/server/upgrade/10.1.99/02-ReplaceJettisonWithJackson
@@ -28,7 +28,7 @@ import pki.server.upgrade
 class ReplaceJettisonWithJackson(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(ReplaceJettisonWithJackson, self).__init__()
         self.message = 'Replace Jettison with Jackson'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.1.99/03-AddedRESTEasyClient b/base/server/upgrade/10.1.99/03-AddedRESTEasyClient
index 63d4a93eb60d1edde0fbe953ed7d78d44a1a6b59..e9a720eafdc55a4e9e8e62e3df13bfc5b167dffc 100755
--- a/base/server/upgrade/10.1.99/03-AddedRESTEasyClient
+++ b/base/server/upgrade/10.1.99/03-AddedRESTEasyClient
@@ -28,7 +28,7 @@ import pki.server.upgrade
 class AddedRESTEasyClient(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(AddedRESTEasyClient, self).__init__()
         self.message = 'Added RESTEasy client'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass b/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass
index bd10b09fe2a304a4118ef1c091549d6d280b8dd1..870fa981c61779b00cc6ea6a4fab42969b5a0725 100755
--- a/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass
+++ b/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass
@@ -20,7 +20,6 @@
 #
 
 import os
-import sys
 from lxml import etree as ET
 
 import pki
@@ -29,7 +28,7 @@ import pki.server.upgrade
 class ReplaceRESTEasyApplicationClass(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(ReplaceRESTEasyApplicationClass, self).__init__()
         self.message = 'Replace RESTEasy application class'
         self.class_names = {
             'ca': 'org.dogtagpki.server.ca.rest.CAApplication',
diff --git a/base/server/upgrade/10.1.99/05-RemoveConfigPathFromWebXML b/base/server/upgrade/10.1.99/05-RemoveConfigPathFromWebXML
index 959cac878600f8a2feb1c53308fa938dad4fa07a..edc27e3f87c0a19517ed64c812aefb0e32b68a13 100755
--- a/base/server/upgrade/10.1.99/05-RemoveConfigPathFromWebXML
+++ b/base/server/upgrade/10.1.99/05-RemoveConfigPathFromWebXML
@@ -28,7 +28,7 @@ import pki.server.upgrade
 class RemoveConfigPathFromWebXML(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(RemoveConfigPathFromWebXML, self).__init__()
         self.message = 'Remove config path from web.xml'
 
     def upgrade_subsystem(self, instance, subsystem):
diff --git a/base/server/upgrade/10.2.1/01-AddTLSRangeSupport b/base/server/upgrade/10.2.1/01-AddTLSRangeSupport
index b5b83f465dc1ff9d1a93d2836b84cc681c2402dd..e2259245b73e65764626593e703daf405b013f6c 100755
--- a/base/server/upgrade/10.2.1/01-AddTLSRangeSupport
+++ b/base/server/upgrade/10.2.1/01-AddTLSRangeSupport
@@ -29,7 +29,7 @@ import pki.server.upgrade
 class AddTLSRangeSupport(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(AddTLSRangeSupport, self).__init__()
         self.message = 'Add TLS Range Support'
 
         self.parser = etree.XMLParser(remove_blank_text=True)
diff --git a/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations b/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations
index 2a1ec99d716ff0124cfa58327ef003cd1e8e0eb1..8d63a55634e12e0ae5a8b84611581cf0e5b08a1d 100755
--- a/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations
+++ b/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations
@@ -21,8 +21,6 @@
 
 import os
 import shutil
-import signal
-import sys
 from lxml import etree
 
 import pki
@@ -32,7 +30,7 @@ import pki.server.upgrade
 class MoveWebApplicationDeploymentLocations(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(MoveWebApplicationDeploymentLocations, self).__init__()
         self.message = 'Move Web application deployment locations'
 
         self.parser = etree.XMLParser(remove_blank_text=True)
@@ -103,7 +101,7 @@ class MoveWebApplicationDeploymentLocations(pki.server.upgrade.PKIServerUpgradeS
         document = etree.parse(context_xml, self.parser)
 
         context = document.getroot()
-        doc_base = context.get('docBase')
+        # doc_base = context.get('docBase')
 
         context.set('docBase', new_webapp)
 
diff --git a/base/server/upgrade/10.2.2/02-EnableWebApplicationAutoDeploy b/base/server/upgrade/10.2.2/02-EnableWebApplicationAutoDeploy
index 7cafa6dcc1ebb0d98b1c0fd2d0a91180b4b9e57f..6e2731d27b83ad71b7ca1b4e3eb55de04e61d72d 100755
--- a/base/server/upgrade/10.2.2/02-EnableWebApplicationAutoDeploy
+++ b/base/server/upgrade/10.2.2/02-EnableWebApplicationAutoDeploy
@@ -19,12 +19,7 @@
 # All rights reserved.
 #
 
-import grp
 import os
-import pwd
-import shutil
-import signal
-import sys
 from lxml import etree
 
 import pki
@@ -34,7 +29,7 @@ import pki.server.upgrade
 class EnableWebApplicationAutoDeploy(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(EnableWebApplicationAutoDeploy, self).__init__()
         self.message = 'Enabled Web application auto deploy'
 
         self.parser = etree.XMLParser(remove_blank_text=True)
diff --git a/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2 b/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
index 520711c182f7bc1d303512fb275efbe9d762ea6a..0c66eadaa449fdec1aef188a1a7505178a73c3c7 100755
--- a/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
+++ b/base/server/upgrade/10.2.2/03-RemoveDependencyOnJackson2
@@ -27,7 +27,7 @@ import pki.server.upgrade
 class RemoveDependencyOnJackson2(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
-
+        super(RemoveDependencyOnJackson2, self).__init__()
         self.message = 'Remove dependency on Jackson 2'
 
     def upgrade_instance(self, instance):
diff --git a/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership b/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership
index 700aaf3ce682682148ed444337b25eaac2482b0b..f7d0f380149c261b8e69eaebe112338252a4c82c 100755
--- a/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership
+++ b/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership
@@ -26,9 +26,9 @@ import pki.server.upgrade
 class FixInstanceWorkFolderOwnership(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
+        super(FixInstanceWorkFolderOwnership, self).__init__()
         self.message = 'Fix instance work folder ownership'
 
     def upgrade_instance(self, instance):
-
-        dir = os.path.join(instance.base_dir, 'work/Catalina/localhost/pki')
-        pki.util.chown(dir, instance.uid, instance.gid)
+        directory = os.path.join(instance.base_dir, 'work/Catalina/localhost/pki')
+        pki.util.chown(directory, instance.uid, instance.gid)
diff --git a/base/server/upgrade/10.2.3/02-FixBindPWPrompt b/base/server/upgrade/10.2.3/02-FixBindPWPrompt
index 7b99afd6f3ca0d40fcb656b8a9ea0cc47e365c61..9ca2bb542acc5ca6db54f3480b72040ad78bc80b 100755
--- a/base/server/upgrade/10.2.3/02-FixBindPWPrompt
+++ b/base/server/upgrade/10.2.3/02-FixBindPWPrompt
@@ -29,6 +29,7 @@ import pki.server.upgrade
 class FixBindPWPrompt(pki.server.upgrade.PKIServerUpgradeScriptlet):
 
     def __init__(self):
+        super(FixBindPWPrompt, self).__init__()
         self.message = 'Fix bindPWPrompt for internalDB'
 
     def upgrade_subsystem(self, instance, subsystem):
diff --git a/base/server/upgrade/10.2.4/01-AddMissingOCSPGETServletMappingToWebXML b/base/server/upgrade/10.2.4/01-AddMissingOCSPGETServletMappingToWebXML
index 9988e0eba4c6631812ca41d896624f084a1faa82..dfc6a98a609b93b5ac3268068377f8d359eff2cf 100755
--- a/base/server/upgrade/10.2.4/01-AddMissingOCSPGETServletMappingToWebXML
+++ b/base/server/upgrade/10.2.4/01-AddMissingOCSPGETServletMappingToWebXML
@@ -20,7 +20,6 @@
 #
 
 import os
-import sys
 from lxml import etree as ET
 
 import pki
@@ -37,8 +36,11 @@ class AddMissingOCSPGETServletMappingToWebXML(pki.server.upgrade.PKIServerUpgrad
        """
 
     def __init__(self):
-
+        super(AddMissingOCSPGETServletMappingToWebXML, self).__init__()
         self.message = 'Add missing OCSP Get Servlet Mapping to upgraded Dogtag 9 instances'
+        self.doc = None
+        self.root = None
+
 
     def upgrade_subsystem(self, instance, subsystem):
         # only affects CA
diff --git a/pylint-build-scan.sh b/pylint-build-scan.sh
index cbaf972f02aba26e09f633c184255756ecf7839d..55c58d3954dfde4b17d45679b7805db537607df0 100755
--- a/pylint-build-scan.sh
+++ b/pylint-build-scan.sh
@@ -11,7 +11,9 @@ fi
 
 HOME_DIR=$1
 
-PYLINT_RC_FILE_PATH="`cd $2/.. ; pwd`/dogtag.pylintrc"
+SCRIPTPATH="$( cd $(dirname $0) ; pwd -P )"
+
+PYLINT_RC_FILE_PATH="$SCRIPTPATH/dogtag.pylintrc"
 
 PYTHON_PACKAGE_DIR="$HOME_DIR`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`"
 
@@ -24,6 +26,8 @@ FILES="$FILES $HOME_DIR/usr/sbin/pkidestroy"
 FILES="$FILES $HOME_DIR/usr/sbin/pki-upgrade"
 FILES="$FILES $HOME_DIR/usr/sbin/pki-server"
 FILES="$FILES $HOME_DIR/usr/sbin/pki-server-upgrade"
+FILES="$FILES $(find $HOME_DIR/usr/share/pki/upgrade -type f)"
+FILES="$FILES $(find $HOME_DIR/usr/share/pki/server/upgrade -type f)"
 
 pylint --rcfile=$PYLINT_RC_FILE_PATH $FILES
 
-- 
2.4.3

