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

[Pki-devel] [PATCH] 66, 67 Fixing warnings reported by pylint in Dogtag 10 python code.



Please review the patches which address the following warnings reported
by pylint.

+-----------+------------+
|message id |occurrences |
+===========+============+
|W0403      |84          |Relative import error (Need to investigate.)
+-----------+------------+
|W1401      |34          |Anomalous backslash in string: ā€˜%sā€™. (All
occurences in regex patterns)
+-----------+------------+
|W0613      |12          |Unused argument %r (This is mainly due to the
keyboard interrupt handler - in every script )
+-----------+------------+
|W0221      |6           |Arguments number differs from %s method (These
cases are basic function overriding, did not find a specific reason as
to why this is causing a warning)
+-----------+------------+
|W0621      |4           |Redefining name %r from outer scope (All cases
related to interrupt handler code in pki* scripts)
+-----------+------------+
|W0212      |4           |Access to a protected member %s of a client
class (Found in pkiparser.py in compose_slots_dict function. This is the
only way for retrieving all the key-value pairs in a section )
+-----------+------------+ (without any entries from the default
sections in the dict.)
|W0612      |1           |Unused variable %r  (A starightforward fix)
+-----------+------------+


Issues remaining to be fixed - 

Messages
--------

+-----------+------------+
|message id |occurrences |
+===========+============+
|W0201      |25          |Attribute %r defined outside __init__ 
+-----------+------------+
|E0202      |1           |An attribute affected in %s line %s hide this
method. E0202: 15,4:CustomTypeEncoder.default: An attribute affected in
json.encoder line 157 hide this method (in encoder.py)
+-----------+------------+

--Abhishek
>From b1233fe62bf3f8f837dbee6329478385b458a92b Mon Sep 17 00:00:00 2001
From: Abhishek Koneru <akoneru redhat com>
Date: Tue, 9 Jul 2013 11:16:52 -0400
Subject: [PATCH 94/94] Fixes for issues reported by pylint.

Fixes for issues in other files.
Ticket #316
---
 base/common/sbin/pki-upgrade             |    6 +++---
 base/server/python/pki/server/upgrade.py |   34 +++++++++++++++---------------
 base/server/sbin/pki-server-upgrade      |    4 ++--
 base/server/src/engine/pkiparser.py      |    3 +++
 base/server/src/engine/pkiscriptlet.py   |    5 +++--
 base/server/src/pkidestroy               |    3 ++-
 base/server/src/pkispawn                 |    3 ++-
 7 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/base/common/sbin/pki-upgrade b/base/common/sbin/pki-upgrade
index 48fb48b933e65bfad6655955fb74b49dd0e3e5bf..f7216d0d0e82fe11ef5b179bf4fa82b5ac6bfa70 100755
--- a/base/common/sbin/pki-upgrade
+++ b/base/common/sbin/pki-upgrade
@@ -26,8 +26,8 @@ import sys
 import pki
 import pki.upgrade
 
-
-def interrupt_handler(signal, frame):
+# pylint: disable-msg=W0613
+def interrupt_handler(event, frame):
     print
     print
     print 'Upgrade canceled.'
@@ -62,7 +62,7 @@ def main(argv):
     signal.signal(signal.SIGINT, interrupt_handler)
 
     try:
-        opts, args = getopt.getopt(argv[1:], 'hi:s:t:vX', [
+        opts, _ = getopt.getopt(argv[1:], 'hi:s:t:vX', [
             'scriptlet-version=', 'scriptlet-index=',
             'silent', 'status', 'revert',
             'remove-tracker', 'reset-tracker', 'set-tracker=',
diff --git a/base/server/python/pki/server/upgrade.py b/base/server/python/pki/server/upgrade.py
index b89cef607ef6bd0ca4bf64fbec18a78c8edc59e9..4afa5a72fbaabd8dea6489b73b6da65a3b918b82 100644
--- a/base/server/python/pki/server/upgrade.py
+++ b/base/server/python/pki/server/upgrade.py
@@ -44,22 +44,22 @@ class PKIServerUpgradeScriptlet(pki.upgrade.PKIUpgradeScriptlet):
     def get_backup_dir(self):
         return BACKUP_DIR + '/' + str(self.version) + '/' + str(self.index)
 
-    def can_upgrade(self, instance, subsystem=None):
+    def can_upgrade_server(self, instance, subsystem=None):
 
         # A scriptlet can run if the version matches the tracker and
         # the index is the next to be executed.
 
-        tracker = self.upgrader.get_tracker(instance, subsystem)
+        tracker = self.upgrader.get_server_tracker(instance, subsystem)
 
         return self.version == tracker.get_version() and \
             self.index == tracker.get_index() + 1
 
-    def update_tracker(self, instance, subsystem=None):
+    def update_server_tracker(self, instance, subsystem=None):
 
         # Increment the index in the tracker. If it's the last scriptlet
         # in this version, update the tracker version.
 
-        tracker = self.upgrader.get_tracker(instance, subsystem)
+        tracker = self.upgrader.get_server_tracker(instance, subsystem)
 
         if not self.last:
             tracker.set_index(self.index)
@@ -78,14 +78,14 @@ class PKIServerUpgradeScriptlet(pki.upgrade.PKIUpgradeScriptlet):
             if self.upgrader.subsystemName:
                 continue
 
-            if not self.can_upgrade(instance):
+            if not self.can_upgrade_server(instance):
                 if verbose: print 'Skipping ' + str(instance) + ' instance.'
                 continue
 
             try:
                 if verbose: print 'Upgrading ' + str(instance) + ' instance.'
                 self.upgrade_instance(instance)
-                self.update_tracker(instance)
+                self.update_server_tracker(instance)
 
             except Exception as e:
 
@@ -108,14 +108,14 @@ class PKIServerUpgradeScriptlet(pki.upgrade.PKIUpgradeScriptlet):
 
         for subsystem in self.upgrader.subsystems(instance):
 
-            if not self.can_upgrade(instance, subsystem):
+            if not self.can_upgrade_server(instance, subsystem):
                 if verbose: print 'Skipping ' + str(subsystem) + ' subsystem.'
                 continue
 
             try:
                 if verbose: print 'Upgrading ' + str(subsystem) + ' subsystem.'
                 self.upgrade_subsystem(instance, subsystem)
-                self.update_tracker(instance, subsystem)
+                self.update_server_tracker(instance, subsystem)
 
             except Exception as e:
 
@@ -215,7 +215,7 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
 
         return subsystem_list
 
-    def get_tracker(self, instance, subsystem=None):
+    def get_server_tracker(self, instance, subsystem=None):
 
         if subsystem:
             name = str(subsystem)
@@ -248,7 +248,7 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
 
             # if upgrading the entire instance, check the instance version
             if not self.subsystemName:
-                tracker = self.get_tracker(instance)
+                tracker = self.get_server_tracker(instance)
                 version = tracker.get_version()
 
                 # if instance version is older, use instance version
@@ -258,7 +258,7 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
             for subsystem in self.subsystems(instance):
 
                 # subsystem is always upgraded, check the subsystem version
-                tracker = self.get_tracker(instance, subsystem)
+                tracker = self.get_server_tracker(instance, subsystem)
                 version = tracker.get_version()
 
                 # if subsystem version is older, use subsystem version
@@ -276,12 +276,12 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
         for instance in self.instances():
 
             if not self.subsystemName:
-                tracker = self.get_tracker(instance)
+                tracker = self.get_server_tracker(instance)
                 tracker.show()
 
             for subsystem in self.subsystems(instance):
 
-                tracker = self.get_tracker(instance, subsystem)
+                tracker = self.get_server_tracker(instance, subsystem)
                 tracker.show()
 
     def set_tracker(self, version):
@@ -289,12 +289,12 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
         for instance in self.instances():
 
             if not self.subsystemName:
-                tracker = self.get_tracker(instance)
+                tracker = self.get_server_tracker(instance)
                 tracker.set(version)
 
             for subsystem in self.subsystems(instance):
 
-                tracker = self.get_tracker(instance, subsystem)
+                tracker = self.get_server_tracker(instance, subsystem)
                 tracker.set(version)
 
         print 'Tracker has been set to version ' + str(version) + '.'
@@ -304,12 +304,12 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
         for instance in self.instances():
 
             if not self.subsystemName:
-                tracker = self.get_tracker(instance)
+                tracker = self.get_server_tracker(instance)
                 tracker.remove()
 
             for subsystem in self.subsystems(instance):
 
-                tracker = self.get_tracker(instance, subsystem)
+                tracker = self.get_server_tracker(instance, subsystem)
                 tracker.remove()
 
         print 'Tracker has been removed.'
diff --git a/base/server/sbin/pki-server-upgrade b/base/server/sbin/pki-server-upgrade
index 59db87ba2634139ddf077a0d6eadad3a2f4e3bf7..dbe7aedb8f0fbe41f8195a6b8191a89c541c4be0 100755
--- a/base/server/sbin/pki-server-upgrade
+++ b/base/server/sbin/pki-server-upgrade
@@ -27,8 +27,8 @@ import pki
 import pki.upgrade
 import pki.server.upgrade
 
-
-def interrupt_handler(signal, frame):
+# pylint: disable-msg=W0613
+def interrupt_handler(event, frame):
     print
     print
     print 'Upgrade canceled.'
diff --git a/base/server/src/engine/pkiparser.py b/base/server/src/engine/pkiparser.py
index 00d9f7322e93c8852b765d3f5cddaec14828cc75..be65cf77267e6d6b5f5a347abde6720a520aee50 100644
--- a/base/server/src/engine/pkiparser.py
+++ b/base/server/src/engine/pkiparser.py
@@ -1070,9 +1070,12 @@ class PKIConfigParser:
             parser.read(config.PKI_DEPLOYMENT_SLOTS_CONFIGURATION_FILE)
             # Slots configuration file name/value pairs
             if config.pki_subsystem in config.PKI_APACHE_SUBSYSTEMS:
+                # pylint: disable-msg=W0212
                 self.pki_slots_dict = dict(parser._sections['Apache'])
             elif config.pki_subsystem in config.PKI_TOMCAT_SUBSYSTEMS:
+                # pylint: disable-msg=W0212
                 self.pki_slots_dict = dict(parser._sections['Tomcat'])
         except ConfigParser.ParsingError, err:
             rv = err
         return rv
+    
diff --git a/base/server/src/engine/pkiscriptlet.py b/base/server/src/engine/pkiscriptlet.py
index 0f67321a0f37b94fed0c2f83011087771cbb2c2d..299cf5de349e30798f343961102162f75b55bbd6 100644
--- a/base/server/src/engine/pkiscriptlet.py
+++ b/base/server/src/engine/pkiscriptlet.py
@@ -26,13 +26,14 @@ import abc
 # PKI Deployment Abstract Base PKI Scriptlet
 class AbstractBasePkiScriptlet(object):
     __metaclass__ = abc.ABCMeta
-
+    
+    # pylint: disable-msg=W0613
     @abc.abstractmethod
     def spawn(self, deployer):
         """Retrieve data from the specified PKI dictionary and
            use it to install a new PKI instance."""
         return
-
+    # pylint: disable-msg=W0613
     @abc.abstractmethod
     def destroy(self, deployer):
         """Retrieve data from the specified PKI dictionary and
diff --git a/base/server/src/pkidestroy b/base/server/src/pkidestroy
index 76fee7206483cd2ca09b71776e12ee36f6f1a1d6..5438075632f00054a85697768c8531401bb6a896 100755
--- a/base/server/src/pkidestroy
+++ b/base/server/src/pkidestroy
@@ -49,7 +49,8 @@ error was:
     sys.exit(1)
 
 #Handle the Keyboard Interrupt
-def interrupt_handler(signal, frame):
+# pylint: disable-msg=W0613
+def interrupt_handler(event, frame):
     print
     print '\nUninstallation canceled.'
     sys.exit(1)
diff --git a/base/server/src/pkispawn b/base/server/src/pkispawn
index 5b38b6e39598b8190bc5d7af76066454d95776ea..706e44cdff6ad9f555119576b9d0f0605798cd54 100755
--- a/base/server/src/pkispawn
+++ b/base/server/src/pkispawn
@@ -52,7 +52,8 @@ error was:
     sys.exit(1)
 
 # Handle the Keyboard Interrupt
-def interrupt_handler(signal, frame):
+# pylint: disable-msg=W0613
+def interrupt_handler(event, frame):
     print
     print '\nInstallation canceled.'
     sys.exit(1)
-- 
1.7.10.2

>From 3d5cc5bee6ee8de3757f9b487a9112792289c460 Mon Sep 17 00:00:00 2001
From: Abhishek Koneru <akoneru redhat com>
Date: Mon, 8 Jul 2013 10:42:11 -0400
Subject: [PATCH 93/94] Fix issues reported by pylint.

Fixed all warnings caused due to absolute import of modules in same
package and not marking the regexes with an r when trying to match.

Ticket #316
---
 base/common/python/pki/__init__.py                  |   10 +++++-----
 base/common/python/pki/upgrade.py                   |    2 +-
 base/server/src/engine/pkihelper.py                 |   10 +++++-----
 base/server/src/engine/pkimanifest.py               |    4 ++--
 base/server/src/engine/pkimessages.py               |    4 ++--
 base/server/src/engine/pkiparser.py                 |    8 ++++----
 base/server/src/scriptlets/configuration.py         |    9 +++++----
 base/server/src/scriptlets/finalization.py          |    8 ++++----
 base/server/src/scriptlets/infrastructure_layout.py |    6 +++---
 base/server/src/scriptlets/initialization.py        |    6 +++---
 base/server/src/scriptlets/instance_layout.py       |    6 +++---
 base/server/src/scriptlets/security_databases.py    |    6 +++---
 base/server/src/scriptlets/selinux_setup.py         |   11 ++++++-----
 base/server/src/scriptlets/slot_substitution.py     |    6 +++---
 base/server/src/scriptlets/subsystem_layout.py      |    6 +++---
 base/server/src/scriptlets/webapp_deployment.py     |    7 +++----
 16 files changed, 55 insertions(+), 54 deletions(-)

diff --git a/base/common/python/pki/__init__.py b/base/common/python/pki/__init__.py
index 979bf64d9bbc78f879636cb3acb67dbdcc3f5cc3..bbcffb8a4d14e6e488edc195d9b4923b315b99ee 100644
--- a/base/common/python/pki/__init__.py
+++ b/base/common/python/pki/__init__.py
@@ -75,7 +75,7 @@ def implementation_version():
             line = line.strip('\n')
 
             # parse <key>: <value>
-            match = re.match('^\s*(\S*)\s*:\s*(.*)\s*$', line)
+            match = re.match(r'^\s*(\S*)\s*:\s*(.*)\s*$', line)
 
             if not match:
                 continue
@@ -147,7 +147,7 @@ class PropertyFile(object):
         for i, line in enumerate(self.lines):
 
             # parse <key> <delimiter> <value>
-            match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
+            match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
 
             if not match:
                 continue
@@ -166,7 +166,7 @@ class PropertyFile(object):
         for line in self.lines:
 
             # parse <key> <delimiter> <value>
-            match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
+            match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
 
             if not match:
                 continue
@@ -184,7 +184,7 @@ class PropertyFile(object):
         for i, line in enumerate(self.lines):
 
             # parse <key> <delimiter> <value>
-            match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
+            match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
 
             if not match:
                 continue
@@ -206,7 +206,7 @@ class PropertyFile(object):
         for i, line in enumerate(self.lines):
 
             # parse <key> <delimiter> <value>
-            match = re.match('^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
+            match = re.match(r'^\s*(\S*)\s*%s\s*(.*)\s*$' % self.delimiter, line)
 
             if not match:
                 continue
diff --git a/base/common/python/pki/upgrade.py b/base/common/python/pki/upgrade.py
index d1cda6bacee991488ae53bf70fc61a803c1fe980..05db24f63f43543373832e3f049ff153d4d65149 100644
--- a/base/common/python/pki/upgrade.py
+++ b/base/common/python/pki/upgrade.py
@@ -55,7 +55,7 @@ class Version(object):
                 raise Exception('Invalid version number: ' + obj)
 
             # parse <major>.<minor>.<patch>
-            match = re.match('^(\d+)\.(\d+)\.(\d+)$', self.version)
+            match = re.match(r'^(\d+)\.(\d+)\.(\d+)$', self.version)
 
             if match is None:
                 raise Exception('Invalid version number: ' + self.version)
diff --git a/base/server/src/engine/pkihelper.py b/base/server/src/engine/pkihelper.py
index c33abe0f81ef97e5f349b34faca574a62ee2d5f7..39a0b8b9efa2c2765fcc706018dc58ab4abcb66e 100644
--- a/base/server/src/engine/pkihelper.py
+++ b/base/server/src/engine/pkihelper.py
@@ -47,11 +47,11 @@ if selinux.is_selinux_enabled():
 
 
 # PKI Deployment Imports
-import pkiconfig as config
-from pkiconfig import pki_selinux_config_ports as ports
-import pkimanifest as manifest
-import pkimessages as log
-from pkiparser import PKIConfigParser
+from . import pkiconfig as config
+from .pkiconfig import pki_selinux_config_ports as ports
+from . import pkimanifest as manifest
+from . import pkimessages as log
+from .pkiparser import PKIConfigParser
 import pki.account
 import pki.client
 import pki.system
diff --git a/base/server/src/engine/pkimanifest.py b/base/server/src/engine/pkimanifest.py
index 721373eac57a4fa7e70ef9b4774b3d1194b15447..09079b4334c713959a5d76735b43515983c40159 100644
--- a/base/server/src/engine/pkimanifest.py
+++ b/base/server/src/engine/pkimanifest.py
@@ -23,8 +23,8 @@
 import csv
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
+from . import pkiconfig as config
+from . import pkimessages as log
 
 
 # PKI Deployment Manifest Constants
diff --git a/base/server/src/engine/pkimessages.py b/base/server/src/engine/pkimessages.py
index 5ee8bb840a162fbb358d90039019198d30c01216..fdbd2831200f7d9a6a771d6c2ebc1dd28ffdfe8a 100644
--- a/base/server/src/engine/pkimessages.py
+++ b/base/server/src/engine/pkimessages.py
@@ -307,10 +307,10 @@ PKI_CONFIG_RESPONSE_ADMIN_CERT = "adminCert:"
 PKI_CONFIG_RESPONSE_STATUS = "status:"
 PKI_CONFIG_NOT_YET_IMPLEMENTED_1 = " %s NOT YET IMPLEMENTED"
 PKI_CHECK_STATUS_MESSAGE = "    To check the status of the subsystem: \n"\
-"        systemctl status pki-tomcatd\ %s service"
+"        systemctl status pki-tomcatd %s service"
 PKI_ACCESS_URL = "    The URL for the subsystem is https://%s:%s/%s";
 PKI_INSTANCE_RESTART_MESSAGE = "    To restart the subsystem: \n"\
-"        systemctl restart pki-tomcatd\ %s service"
+"        systemctl restart pki-tomcatd %s service"
 
 
 PKI_SPAWN_INFORMATION_HEADER = "\n    ==========================================================================\n"\
diff --git a/base/server/src/engine/pkiparser.py b/base/server/src/engine/pkiparser.py
index a70a8df6e16f0e9a266e098af396c7b02ee74d57..00d9f7322e93c8852b765d3f5cddaec14828cc75 100644
--- a/base/server/src/engine/pkiparser.py
+++ b/base/server/src/engine/pkiparser.py
@@ -34,13 +34,13 @@ import subprocess
 # PKI Imports
 import pki
 import pki.upgrade
-import pkilogging
-import pkiconfig as config
-import pkimessages as log
-
 import pki.account
 import pki.client
 import pki.system
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkilogging
+
 
 class PKIConfigParser:
 
diff --git a/base/server/src/scriptlets/configuration.py b/base/server/src/scriptlets/configuration.py
index b2223cab72fbf640c4b0aad64ca2635ebc9b975f..d32437f0bc5316cd9f1357aa930636a15a1f7f09 100644
--- a/base/server/src/scriptlets/configuration.py
+++ b/base/server/src/scriptlets/configuration.py
@@ -19,11 +19,12 @@
 # All rights reserved.
 #
 
-# PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
 import json
+
+# PKI Deployment Imports
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 import pki.system
 import pki.encoder
 
diff --git a/base/server/src/scriptlets/finalization.py b/base/server/src/scriptlets/finalization.py
index 529f9d45d6f698a7469b6c7a344e1bd0a630c54c..0d937584a5b513415ab05e966b4d9492969b4087 100644
--- a/base/server/src/scriptlets/finalization.py
+++ b/base/server/src/scriptlets/finalization.py
@@ -20,10 +20,10 @@
 #
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimanifest as manifest
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimanifest as manifest
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Finalization Scriptlet
diff --git a/base/server/src/scriptlets/infrastructure_layout.py b/base/server/src/scriptlets/infrastructure_layout.py
index 3becd34c3de8ccbc30014a15c0197fe09752ce9d..e4d32bb0bae506cf5ac05bbcac7246e6e566e028 100644
--- a/base/server/src/scriptlets/infrastructure_layout.py
+++ b/base/server/src/scriptlets/infrastructure_layout.py
@@ -20,9 +20,9 @@
 #
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Top-Level Infrastructure Layout Scriptlet
diff --git a/base/server/src/scriptlets/initialization.py b/base/server/src/scriptlets/initialization.py
index 41e5752029cbe04112ca6c2498820002786bfcaa..55b984693ee5c0f95fb04a99c38a02e81f3d75b1 100644
--- a/base/server/src/scriptlets/initialization.py
+++ b/base/server/src/scriptlets/initialization.py
@@ -20,9 +20,9 @@
 #
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Initialization Scriptlet
diff --git a/base/server/src/scriptlets/instance_layout.py b/base/server/src/scriptlets/instance_layout.py
index 99a97532bb319a683d70b4a7f2be9550794066fa..fe02a9f9d6b23eba8ce8439c4f9089e8c8129586 100644
--- a/base/server/src/scriptlets/instance_layout.py
+++ b/base/server/src/scriptlets/instance_layout.py
@@ -24,9 +24,9 @@ import os
 
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Instance Layout Scriptlet
diff --git a/base/server/src/scriptlets/security_databases.py b/base/server/src/scriptlets/security_databases.py
index d8a6eeb6569a82c39878cfb010bb5a4a65916a36..aa522ce043e51f3cbdc91efdb228a67c2fcbc5e7 100644
--- a/base/server/src/scriptlets/security_databases.py
+++ b/base/server/src/scriptlets/security_databases.py
@@ -20,9 +20,9 @@
 #
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Security Databases Scriptlet
diff --git a/base/server/src/scriptlets/selinux_setup.py b/base/server/src/scriptlets/selinux_setup.py
index 5e3a5ab0d2e44078cd2a72bfca0d0a36f99219b4..dbc98c23b5df2eef338204021c87b491984a791e 100644
--- a/base/server/src/scriptlets/selinux_setup.py
+++ b/base/server/src/scriptlets/selinux_setup.py
@@ -19,15 +19,16 @@
 # All rights reserved.
 #
 
-# PKI Deployment Imports
-import pkiconfig as config
-from pkiconfig import pki_selinux_config_ports as ports
-import pkimessages as log
-import pkiscriptlet
 import selinux
 import time
 if selinux.is_selinux_enabled():
     import seobject
+    
+# PKI Deployment Imports
+from . import pkiconfig as config
+from .pkiconfig import pki_selinux_config_ports as ports
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Selinux Setup Scriptlet
diff --git a/base/server/src/scriptlets/slot_substitution.py b/base/server/src/scriptlets/slot_substitution.py
index bd3211b9d65ec4844b3e3b443135e3960f78f66c..2bb888dfd2e28fcf2ed2e54c5b2d3eec04d0ce22 100644
--- a/base/server/src/scriptlets/slot_substitution.py
+++ b/base/server/src/scriptlets/slot_substitution.py
@@ -20,9 +20,9 @@
 #
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Slot Substitution Scriptlet
diff --git a/base/server/src/scriptlets/subsystem_layout.py b/base/server/src/scriptlets/subsystem_layout.py
index 8e484177642201e4204c12ed6b33761447869740..81dedf68c9aaff78c7990eec290897807ec1f989 100644
--- a/base/server/src/scriptlets/subsystem_layout.py
+++ b/base/server/src/scriptlets/subsystem_layout.py
@@ -20,9 +20,9 @@
 #
 
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Deployment Subsystem Layout Scriptlet
diff --git a/base/server/src/scriptlets/webapp_deployment.py b/base/server/src/scriptlets/webapp_deployment.py
index bd8de9a15db7d6f7ab9fe08b6bba05db15686feb..4a37b6df9651c816f27144447ae5fdcaca92297e 100644
--- a/base/server/src/scriptlets/webapp_deployment.py
+++ b/base/server/src/scriptlets/webapp_deployment.py
@@ -22,11 +22,10 @@
 # System Imports
 import os
 
-
 # PKI Deployment Imports
-import pkiconfig as config
-import pkimessages as log
-import pkiscriptlet
+from . import pkiconfig as config
+from . import pkimessages as log
+from . import pkiscriptlet
 
 
 # PKI Web Application Deployment Scriptlet
-- 
1.7.10.2


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