>From 4895bd43208b01b7e590f3a6a10be094a550c3c2 Mon Sep 17 00:00:00 2001
From: Abhishek Koneru <akoneru@redhat.com>
Date: Tue, 4 Jun 2013 18:04:25 -0400
Subject: [PATCH] Adding PEP8 standards to python code.

Configured the available options in Eclipse+Pydev setup to
incorporate PEP 8 coding standards to the python code.
Fixes nearly 300 such issues reported by Pylint scan.

Ticket #316
---
 base/common/python/pki/__init__.py                 |   10 +-
 base/common/python/pki/client.py                   |    2 +-
 base/common/python/pki/system.py                   |    2 +-
 base/common/python/pki/upgrade.py                  |   18 +-
 base/kra/functional/drmclient.py                   |  350 ++++-----
 base/server/python/pki/server/__init__.py          |    6 +-
 base/server/python/pki/server/upgrade.py           |   10 +-
 base/server/src/engine/pkiconfig.py                |   20 +-
 base/server/src/engine/pkihelper.py                |  820 ++++++++++----------
 base/server/src/engine/pkilogging.py               |    8 +-
 base/server/src/engine/pkimanifest.py              |   14 +-
 base/server/src/engine/pkimessages.py              |   44 +-
 base/server/src/engine/pkiparser.py                |  394 +++++-----
 base/server/src/scriptlets/configuration.py        |    2 +-
 .../server/src/scriptlets/infrastructure_layout.py |    4 +-
 base/server/src/scriptlets/security_databases.py   |    2 +-
 base/server/src/scriptlets/slot_substitution.py    |    8 +-
 17 files changed, 857 insertions(+), 857 deletions(-)

diff --git a/base/common/python/pki/__init__.py b/base/common/python/pki/__init__.py
index 404aa92d422b7b8257792257eeacbde7a6bb3bfa..979bf64d9bbc78f879636cb3acb67dbdcc3f5cc3 100644
--- a/base/common/python/pki/__init__.py
+++ b/base/common/python/pki/__init__.py
@@ -23,12 +23,12 @@ import os
 import re
 
 
-CONF_DIR          = '/etc/pki'
-SHARE_DIR         = '/usr/share/pki'
-BASE_DIR          = '/var/lib'
-LOG_DIR           = '/var/log/pki'
+CONF_DIR = '/etc/pki'
+SHARE_DIR = '/usr/share/pki'
+BASE_DIR = '/var/lib'
+LOG_DIR = '/var/log/pki'
 
-PACKAGE_VERSION   = SHARE_DIR + '/VERSION'
+PACKAGE_VERSION = SHARE_DIR + '/VERSION'
 
 
 def read_text(message,
diff --git a/base/common/python/pki/client.py b/base/common/python/pki/client.py
index 05f42ba06c45d62e76e0253ad8bae32aab2dc07a..00343bb7c644b8edef2618b3fc88ba03d666810e 100644
--- a/base/common/python/pki/client.py
+++ b/base/common/python/pki/client.py
@@ -35,7 +35,7 @@ class PKIConnection:
         self.port = port
         self.subsystem = subsystem
 
-        self.serverURI = self.protocol + '://' +\
+        self.serverURI = self.protocol + '://' + \
             self.hostname + ':' + self.port + '/' + \
             self.subsystem
 
diff --git a/base/common/python/pki/system.py b/base/common/python/pki/system.py
index 5b4caf7f36ddd97d05e2e71ee6a526353e9e49e5..4dd3baac2ddcafc4763a485ce0e5418c193a6bbd 100644
--- a/base/common/python/pki/system.py
+++ b/base/common/python/pki/system.py
@@ -87,7 +87,7 @@ class SystemStatusClient:
         self.connection = connection
 
     def getStatus(self):
-        r = self.connection.get('/admin/' +\
+        r = self.connection.get('/admin/' + \
                 self.connection.subsystem + '/getStatus')
         return r.text
 
diff --git a/base/common/python/pki/upgrade.py b/base/common/python/pki/upgrade.py
index 9f927130f241b585b4f7c2fb4fd2367c6c17f618..e9e40b15cdfd8c3b8e9222b6f92e9ad58cdb06a4 100644
--- a/base/common/python/pki/upgrade.py
+++ b/base/common/python/pki/upgrade.py
@@ -29,12 +29,12 @@ import pki
 import pki.util
 
 
-DEFAULT_VERSION    = '10.0.0'
+DEFAULT_VERSION = '10.0.0'
 
-UPGRADE_DIR        = pki.SHARE_DIR + '/upgrade'
-BACKUP_DIR         = pki.LOG_DIR + '/upgrade'
-SYSTEM_TRACKER     = pki.CONF_DIR + '/pki.version'
-verbose            = False
+UPGRADE_DIR = pki.SHARE_DIR + '/upgrade'
+BACKUP_DIR = pki.LOG_DIR + '/upgrade'
+SYSTEM_TRACKER = pki.CONF_DIR + '/pki.version'
+verbose = False
 
 
 @functools.total_ordering
@@ -172,14 +172,14 @@ class PKIUpgradeTracker(object):
             i = self.properties.index(self.version_key)
             if i >= 0:
                 # if version exists, add index after version
-                self.properties.set(self.index_key, str(index), index=i+1)
+                self.properties.set(self.index_key, str(index), index=i + 1)
 
             else:
                 # otherwise, add index at the end separated by a blank line
 
                 # if last line is not empty, append empty line
                 length = len(self.properties.lines)
-                if length > 0 and self.properties.lines[length-1] != '':
+                if length > 0 and self.properties.lines[length - 1] != '':
                     self.properties.insert_line(length, '')
                     length = length + 1
 
@@ -219,7 +219,7 @@ class PKIUpgradeTracker(object):
 
             # if last line is not empty, append empty line
             length = len(self.properties.lines)
-            if length > 0 and self.properties.lines[length-1] != '':
+            if length > 0 and self.properties.lines[length - 1] != '':
                 self.properties.insert_line(length, '')
                 length = length + 1
 
@@ -460,7 +460,7 @@ class PKIUpgrader(object):
                 raise pki.PKIException('Invalid scriptlet name: ' + filename, e)
 
             index = int(filename[0:i])
-            classname = filename[i+1:]
+            classname = filename[i + 1:]
 
             if self.index and index != self.index:
                 continue
diff --git a/base/kra/functional/drmclient.py b/base/kra/functional/drmclient.py
index ea9514dce625bf59b4d51c5746de6ebb005b0bd4..afa3d9947c67180b9cd88514df3ccc2fcc5a6c9a 100644
--- a/base/kra/functional/drmclient.py
+++ b/base/kra/functional/drmclient.py
@@ -27,7 +27,7 @@ This is a python client that can be used to retrieve key requests
 and keys from a KRA using the new RESTful interface.  Moreover, given
 a PKIArchiveOptions structure containing either a passphrase or a symmetric
 key, this data can be stored in and retrieved from the KRA.
- 
+
 A sample test execution is provided at the end of the file.
 '''
 
@@ -78,25 +78,25 @@ def parse_key_request_info_xml(doc):
         request_type = etree.tostring(request_type[0], method='text',
                                            encoding=unicode).strip()
         response['request_type'] = request_type
-    
+
     request_status = doc.xpath('requestStatus')
     if len(request_status) == 1:
         request_status = etree.tostring(request_status[0], method='text',
                                            encoding=unicode).strip()
         response['request_status'] = request_status
-     
+
     request_url = doc.xpath('requestURL')
     if len(request_url) == 1:
         request_url = etree.tostring(request_url[0], method='text',
                                            encoding=unicode).strip()
-        response['request_id'] = request_url.rsplit('/',1)[1]   
-    
+        response['request_id'] = request_url.rsplit('/', 1)[1]
+
     key_url = doc.xpath('keyURL')
     if len(key_url) == 1:
         key_url = etree.tostring(key_url[0], method='text',
                                            encoding=unicode).strip()
-        response['key_id'] = key_url.rsplit('/',1)[1]
-           
+        response['key_id'] = key_url.rsplit('/', 1)[1]
+
     return response
 
 def parse_key_request_infos_xml(doc):
@@ -119,10 +119,10 @@ def parse_key_request_infos_xml(doc):
     +----------------------+------------------------+-----------------------+---------------+
     |info for each request |KeyRequestInfo          |request_id [2]         |dict           |
     +----------------------+------------------------+-----------------------+---------------+
-    
-    [1] prev_id and next_id are the starting ids for the previous and next pages 
+
+    [1] prev_id and next_id are the starting ids for the previous and next pages
         respectively.  They are extracted from the href elements of the Link
-        nodes (if they exist) 
+        nodes (if they exist)
     [2] For each key request info returned, we store a dict containing the key request data.
         See parse_key_request_info_xml for details.  Each dict is referenced by the id
         of the key request (extracted from the key request URL).
@@ -132,21 +132,21 @@ def parse_key_request_infos_xml(doc):
     if len(next_link) == 1:
         next_link = etree.tostring(next_link[0], method='text',
                                    encoding=unicode).strip()
-        next_link = next_link.rsplit('/',1)[1]
+        next_link = next_link.rsplit('/', 1)[1]
         response['next_id'] = next_link
-    
+
     prev_link = doc.xpath('//Link[@rel="previous"]/href')
     if len(prev_link) == 1:
         prev_link = etree.tostring(prev_link[0], method='text',
                                    encoding=unicode).strip()
         prev_link = prev_link.rsplit('/', 1)[1]
         response['prev_id'] = prev_link
-    
+
     key_request_infos = doc.xpath('//KeyRequestInfo')
     for key_request in key_request_infos:
         node = parse_key_request_info_xml(key_request)
         response[node['request_id']] = node
-      
+
     return response
 
 def parse_key_data_info_xml(doc):
@@ -204,21 +204,21 @@ def parse_key_data_infos_xml(doc):
     +----------------------+-----------------+-----------------------+---------------+
     |info for each key     |KeyDataInfo      |key_id [2]             |dict           |
     +----------------------+-----------------+-----------------------+---------------+
-    
-    [1] prev_id and next_id are the starting ids for the previous and next pages 
+
+    [1] prev_id and next_id are the starting ids for the previous and next pages
         respectively.  They are extracted from the href elements of the Link
-        nodes (if they exist) 
+        nodes (if they exist)
     [2] For each key info returned, we store a dict containing the key data.
         See parse_key_data_info_xml for details.  Each dict is referenced by the id
         of the key (extracted from the key URL).
     '''
     response = {}
-    
+
     next_link = doc.xpath('//Link[@rel="next"]/href')
     if len(next_link) == 1:
         next_link = etree.tostring(next_link[0], method='text',
                                    encoding=unicode).strip()
-        next_link = next_link.rsplit('/',1)[1]
+        next_link = next_link.rsplit('/', 1)[1]
         response['next_id'] = next_link
 
     prev_link = doc.xpath('//Link[@rel="previous"]/href')
@@ -227,12 +227,12 @@ def parse_key_data_infos_xml(doc):
                                    encoding=unicode).strip()
         prev_link = prev_link.rsplit('/', 1)[1]
         response['prev_id'] = prev_link
-    
+
     key_data_infos = doc.xpath('//KeyDataInfo')
     for key_data in key_data_infos:
         node = parse_key_data_info_xml(key_data)
-        response[node['key_url'].rsplit('/',1)[1]] = node
-      
+        response[node['key_url'].rsplit('/', 1)[1]] = node
+
     return response
 
 def parse_key_data_xml(doc):
@@ -241,7 +241,7 @@ def parse_key_data_xml(doc):
     :returns:   result dict
     :except ValueError:
 
-    After parsing the results are returned in a result dict.  
+    After parsing the results are returned in a result dict.
 
     +----------------------+----------------+-----------------------+---------------+
     |cms name			   |cms type		|result name			|result type	|
@@ -250,22 +250,22 @@ def parse_key_data_xml(doc):
     +----------------------+----------------+-----------------------+---------------+
     |nonceData             |string          |nonce_data             |unicode        |
     +----------------------+----------------+-----------------------+---------------+
-     
+
     '''
     response = {}
-    
+
     wrapped_data = doc.xpath('wrappedPrivateData')
     if len(wrapped_data) == 1:
         wrapped_data = etree.tostring(wrapped_data[0], method='text',
                                       encoding=unicode).strip()
         response['wrapped_data'] = wrapped_data
-    
+
     nonce_data = doc.xpath('nonceData')
     if len(nonce_data) == 1:
         nonce_data = etree.tostring(nonce_data[0], method='text',
                                     encoding=unicode).strip()
         response['nonce_data'] = nonce_data
-    
+
     return response
 
 def parse_certificate_data_xml(doc):
@@ -274,26 +274,26 @@ def parse_certificate_data_xml(doc):
     :returns:   result dict
     :except ValueError:
 
-    After parsing the results are returned in a result dict.  
+    After parsing the results are returned in a result dict.
 
     +----------------------+----------------+-----------------------+---------------+
     |cms name			   |cms type		|result name			|result type	|
     +======================+================+=======================+===============+
     |b64            	   |string	[1]     |cert	        	    |unicode	    |
     +----------------------+----------------+-----------------------+---------------+
-     
+
     [1] Base-64 encoded certificate with header and footer
     '''
     response = {}
-    
+
     b64 = doc.xpath('b64')
     if len(b64) == 1:
         b64 = etree.tostring(b64[0], method='text',
                              encoding=unicode).strip()
         response['cert'] = b64.replace(CERT_HEADER, "").replace(CERT_FOOTER, "")
-    
+
     return response
-   
+
 def https_request(host, port, url, secdir, password, nickname, operation, args, **kw):
     """
     :param url:        The URL to post to.
@@ -309,7 +309,7 @@ def https_request(host, port, url, secdir, password, nickname, operation, args,
         host = host.encode('utf-8')
     uri = 'https://%s%s' % (ipautil.format_netloc(host, port), url)
     logging.info('sslget %r', uri)
-    
+
     request_headers = {"Content-type": "application/xml",
                        "Accept": "application/xml"}
     if operation == "POST":
@@ -318,7 +318,7 @@ def https_request(host, port, url, secdir, password, nickname, operation, args,
         elif kw != None:
             post = urlencode(kw)
             request_headers = {"Content-type": "application/x-www-form-urlencoded",
-                               "Accept": "text/plain"}     
+                               "Accept": "text/plain"}
     try:
         conn = nsslib.NSSConnection(host, port, dbdir=secdir)
         conn.set_debuglevel(0)
@@ -329,7 +329,7 @@ def https_request(host, port, url, secdir, password, nickname, operation, args,
         if operation == "GET":
             url = url + "?" + args
             conn.request("GET", url)
-        elif operation == "POST": 
+        elif operation == "POST":
             conn.request("POST", url, post, request_headers)
 
         res = conn.getresponse()
@@ -364,7 +364,7 @@ def http_request(host, port, url, operation, args):
         if args != None:
             post = args
         else:
-            post = ""     
+            post = ""
     conn = httplib.HTTPConnection(host, port)
     try:
         if operation == "GET":
@@ -373,7 +373,7 @@ def http_request(host, port, url, operation, args):
             conn.request("GET", url)
         elif operation == "POST":
             conn.request("POST", url, post, request_headers)
-                 
+
         res = conn.getresponse()
 
         http_status = res.status
@@ -384,10 +384,10 @@ def http_request(host, port, url, operation, args):
     except NSPRError, e:
         raise NetworkError(uri=uri, error=str(e))
 
-    logging.debug('request status %d',        http_status)
+    logging.debug('request status %d', http_status)
     logging.debug('request reason_phrase %r', http_reason_phrase)
-    logging.debug('request headers %s',       http_headers)
-    logging.debug('request body %r',          http_body)
+    logging.debug('request headers %s', http_headers)
+    logging.debug('request body %r', http_body)
 
     return http_status, http_reason_phrase, http_headers, http_body
 
@@ -395,7 +395,7 @@ class kra:
     """
     Key Repository Authority backend plugin.
     """
-    
+
     POST = "POST"
     GET = "GET"
     transport_cert = "byte array with transport cert"
@@ -403,9 +403,9 @@ class kra:
     iv = "e4:bb:3b:d3:c3:71:2e:58"
     fullname = "kra"
 
-    
+
     def __init__(self, work_dir, kra_host, kra_port, kra_nickname):
-        #crypto
+        # crypto
         self.sec_dir = work_dir
         self.pwd_file = work_dir + "/pwdfile.txt"
         self.transport_cert_nickname = kra_nickname
@@ -416,15 +416,15 @@ class kra:
             f.close()
         except IOError:
             self.password = ''
-            
-        #set up key db for crypto functions
+
+        # set up key db for crypto functions
         try:
             nss.nss_init(self.sec_dir)
         except Exception, e:
             raise CertificateOperationError(error=_('Error in initializing certdb (%s)') \
                       + e.strerror)
         self.transport_cert = nss.find_cert_from_nickname(self.transport_cert_nickname)
-        
+
         # DRM info
         self.kra_host = kra_host
         self.kra_agent_port = kra_port
@@ -433,12 +433,12 @@ class kra:
     def setup_contexts(self, mechanism, sym_key, iv):
         # Get a PK11 slot based on the cipher
         slot = nss.get_best_slot(mechanism)
-            
+
         if sym_key == None:
             sym_key = slot.key_gen(mechanism, None, slot.get_best_key_length(mechanism))
 
         # If initialization vector was supplied use it, otherwise set it to None
-        if iv:       
+        if iv:
             iv_data = nss.read_hex(iv)
             iv_si = nss.SecItem(iv_data)
             iv_param = nss.param_from_iv(mechanism, iv_si)
@@ -454,7 +454,7 @@ class kra:
         # Create an encoding context
         encoding_ctx = nss.create_context_by_sym_key(mechanism, nss.CKA_ENCRYPT,
                                                      sym_key, iv_param)
-        
+
         # Create a decoding context
         decoding_ctx = nss.create_context_by_sym_key(mechanism, nss.CKA_DECRYPT,
                                                      sym_key, iv_param)
@@ -489,35 +489,35 @@ class kra:
 
         Perform an HTTPS request
         """
-        return https_request(self.kra_host, port, url, self.sec_dir, self.password, 
+        return https_request(self.kra_host, port, url, self.sec_dir, self.password,
 							 self.ipa_certificate_nickname, operation, args, **kw)
 
     def symmetric_wrap(self, data, wrapping_key):
         """
         :param data:           Data to be wrapped
         :param wrapping_key    Symmetric key to wrap data
-        
+
         Wrap (encrypt) data using the supplied symmetric key
         """
         encoding_ctx, decoding_ctx = self.setup_contexts(self.mechanism, wrapping_key, self.iv)
         wrapped_data = encoding_ctx.cipher_op(data) + encoding_ctx.digest_final()
         return wrapped_data
-    
+
     def asymmetric_wrap(self, data, wrapping_cert):
         """
         :param data:           Data to be wrapped
         :param wrapping_cert    Public key to wrap data
-        
+
         Wrap (encrypt) data using the supplied asymmetric key
         """
-        
+
         return None
-    
-    def symmetric_unwrap(self, data, wrapping_key, iv = None):
+
+    def symmetric_unwrap(self, data, wrapping_key, iv=None):
         """
         :param data:           Data to be unwrapped
         :param wrapping_key    Symmetric key to unwrap data
-        
+
         Unwrap (decrypt) data using the supplied symmetric key
         """
         if iv == None:
@@ -525,7 +525,7 @@ class kra:
         encoding_ctx, decoding_ctx = self.setup_contexts(self.mechanism, wrapping_key, iv)
         unwrapped_data = decoding_ctx.cipher_op(data) + decoding_ctx.digest_final()
         return unwrapped_data
-    
+
     def get_parse_result_xml(self, xml_text, parse_func):
         '''
         :param xml_text:   The XML text to parse
@@ -545,7 +545,7 @@ class kra:
     def create_archival_request(self, client_id, security_data, data_type):
         """
         :param :param client_id:  identifier to be used for this stored key
-        :param security_data:     data blob (PKIArchiveOptions) containing passphrase 
+        :param security_data:     data blob (PKIArchiveOptions) containing passphrase
                                   or symmetric key to be archived
         :param data_type:         data type (symmetricKey, pass_phrase, asymmetricKey)
         :return doc:              xml doc with archival request
@@ -559,15 +559,15 @@ class kra:
         data_type_element = etree.SubElement(root, "dataType")
         data_type_element.text = data_type
         return etree.ElementTree(root)
-       
-    def create_recovery_request(self, key_id, request_id, session_key, passphrase, nonce = None):
+
+    def create_recovery_request(self, key_id, request_id, session_key, passphrase, nonce=None):
         """
         :param key_id:            identifier of key to be recovered
-        :param request_id:        id for the recovery request 
+        :param request_id:        id for the recovery request
         :param session_key        session key wrapped in transport key
         :param passphrase         passphrase wrapped in session key
         :return doc:              xml doc with archival request
-        
+
     	"""
         self.debug('%s.create_recovery_request()', self.fullname)
         root = etree.Element("KeyRecoveryRequest")
@@ -587,36 +587,36 @@ class kra:
             nonce_element = etree.SubElement(root, "nonceData")
             nonce_element.text = nonce
         return etree.ElementTree(root)
-        
+
     def archive_security_data(self, client_id, security_data, data_type):
         """
         :param client_id:     identifier to be used for this stored key
-        :param security_data: data blob (PKIArchiveOptions) containing passphrase 
+        :param security_data: data blob (PKIArchiveOptions) containing passphrase
                               or symmetric key to be archived
         :param data_type:     data type (symmetricKey, pass_phrase, asymmetricKey)
-        
+
         Archives security data packaged in a PKIArchiveOptions blob
-        
-        The command returns a dict with key/value pairs as defined in 
+
+        The command returns a dict with key/value pairs as defined in
         parse_key_request_info_xml().  These include the request_id of the created
         archival request, the status of the request, and the key_id of the archived
         key.
         """
         self.debug('%s.archive_security_data()', self.fullname)
-        
+
         # check clientID and security data
         if ((client_id == None) or (security_data == None)):
             raise CertificateOperationError(error=_('Bad arguments to archive_security_data'))
-           
+
         request = self.create_archival_request(client_id, security_data, data_type)
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
             self._request('/kra/rest/agent/keyrequests/archive',
                          self.kra_agent_port,
                          self.POST,
-                         etree.tostring(request.getroot(), encoding='UTF-8'))            
-                          
+                         etree.tostring(request.getroot(), encoding='UTF-8'))
+
         # Parse and handle errors
         if (http_status != 200):
             raise CertificateOperationError(error=_('Error in archiving request (%s)') % \
@@ -624,25 +624,25 @@ class kra:
 
         parse_result = self.get_parse_result_xml(http_body, parse_key_request_info_xml)
         return parse_result
-    
+
     def get_transport_cert(self, etag=None):
         """
         :param etag:    etag info for last cert retrieval from DRM
-         
+
         Gets the transport certificate from the DRM
-        
-        The command returns a dict as defined in parse_certificate_data_xml()        
+
+        The command returns a dict as defined in parse_certificate_data_xml()
         """
         self.debug('%s.get_transport_cert()', self.fullname)
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
             self._request('/kra/rest/config/cert/transport',
                          self.kra_agent_port,
                          self.GET,
-                         None)            
-        
-        self.debug("headers: %s" , http_headers)                  
+                         None)
+
+        self.debug("headers: %s" , http_headers)
         # Parse and handle errors
         if (http_status != 200):
             raise CertificateOperationError(error=_('Error in archiving request (%s)') % \
@@ -650,78 +650,78 @@ class kra:
 
         parse_result = self.get_parse_result_xml(http_body, parse_certificate_data_xml)
         return parse_result
-         
-    def list_security_data(self, client_id, key_state = None, next_id = None):
+
+    def list_security_data(self, client_id, key_state=None, next_id=None):
         """
         :param client_id:     identifier to be searched for
         :param key_state:     state for key (active, inactive, all)
         :param next_id:       id for starting key on next page (if more than one page)
-        
+
         List security data matching the specified client id and state
-        
-        The command returns a dict as specified in parse_key_data_infos_xml().   	 
+
+        The command returns a dict as specified in parse_key_data_infos_xml().
         """
         self.debug('%s.list_security_data()', self.fullname)
         if client_id == None:
-            raise CertificateOperationError(error=_('Bad argument to list_security_data'))   
+            raise CertificateOperationError(error=_('Bad argument to list_security_data'))
         get_args = "clientID=" + quote_plus(client_id)
-        
+
         if key_state != None:
             get_args = get_args + "&status=" + quote_plus(key_state)
-        
+
         if next_id != None:
             # currnently not implemented on server
             get_args = get_args + "&start=" + quote_plus(next_id)
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
             self._request('/kra/rest/agent/keys',
                           self.kra_agent_port,
                           self.GET,
                           get_args)
-                          
+
         # Parse and handle errors
         if (http_status != 200):
             raise CertificateOperationError(error=_('Error in listing keys (%s)') % \
                       http_reason_phrase)
 
         parse_result = self.get_parse_result_xml(http_body, parse_key_data_infos_xml)
-        return parse_result         
-    
-    def list_key_requests(self, request_state = None, request_type = None, client_id = None, 
-                          next_id = None):
+        return parse_result
+
+    def list_key_requests(self, request_state=None, request_type=None, client_id=None,
+                          next_id=None):
         """
         :param request_state:  state of request (pending, complete, cancelled, rejected, approved)
         :param request_type:   request type (enrollment, recovery)
         :param next_id:       id for starting key on next page (if more than one page)
-        
+
         List security data matching the specified client id and state
-        
-        The command returns a dict as specified in parse_key_request_infos_xml().   	 
+
+        The command returns a dict as specified in parse_key_request_infos_xml().
         """
         self.debug('%s.list_key_requests()', self.fullname)
         get_args = ""
-        
+
         if request_state != None:
             get_args = get_args + "&requestState=" + quote_plus(request_state)
-        
+
         if request_type != None:
             get_args = get_args + "&requestType=" + quote_plus(request_type)
-        
+
         if client_id != None:
             get_args = get_args + "&clientID=" + quote_plus(client_id)
-        
+
         if next_id != None:
             # currnently not implemented on server
             get_args = get_args + "&start=" + quote_plus(next_id)
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
             self._request('/kra/rest/agent/keyrequests',
                           self.kra_agent_port,
                           self.GET,
                           get_args)
-                          
+
         # Parse and handle errors
         if (http_status != 200):
             raise CertificateOperationError(error=_('Error in listing key requests (%s)') % \
@@ -729,32 +729,32 @@ class kra:
 
         parse_result = self.get_parse_result_xml(http_body, parse_key_request_infos_xml)
         return parse_result
-       
+
     def submit_recovery_request(self, key_id):
         """
         :param key_id: identifier of data to be recovered
-        
+
         Create a recovery request for a passphrase or symmetric key
-        
-        The command returns a dict as described in the comments to 
+
+        The command returns a dict as described in the comments to
         parse_key_request_info_xml().  This data includes the request_id
-        of the created recovery request         
+        of the created recovery request
         """
         self.debug('%s.submit_recovery_request()', self.fullname)
-        
+
         # check clientID and security data
         if key_id == None:
             raise CertificateOperationError(error=_('Bad argument to archive_security_data'))
-           
+
         request = self.create_recovery_request(key_id, None, None, None)
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
             self._request('/kra/rest/agent/keyrequests/recover',
                          self.kra_agent_port,
                          self.POST,
-                         etree.tostring(request.getroot(), encoding='UTF-8'))            
-                          
+                         etree.tostring(request.getroot(), encoding='UTF-8'))
+
         # Parse and handle errors
         if (http_status != 200):
             raise CertificateOperationError(error=_('Error in archiving request (%s)') % \
@@ -762,13 +762,13 @@ class kra:
 
         parse_result = self.get_parse_result_xml(http_body, parse_key_request_info_xml)
         return parse_result
-        
+
     def check_request_status(self, request_id):
         """
         :param recovery_request_id:  identifier of key recovery request
-        
+
         Check recovery request status
-        
+
         The command returns a dict with these possible key/value pairs.
         Some key/value pairs may be absent
 
@@ -785,89 +785,89 @@ class kra:
         +-----------------+---------------+---------------------------------------+
         """
         self.debug('%s.check_request_status()', self.fullname)
-                
+
     def approve_recovery_request(self, request_id):
         """
         :param request_id:  identifier of key recovery request
-        
-        Approve recovery request    	 
+
+        Approve recovery request
         """
         self.debug('%s.approve_recovery_request()', self.fullname)
         if request_id == None:
             raise CertificateOperationError(error=_('Bad argument to approve_recovery_request'))
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
-            self._request('/kra/rest/agent/keyrequests/'+request_id+'/approve',
+            self._request('/kra/rest/agent/keyrequests/' + request_id + '/approve',
                          self.kra_agent_port,
                          self.POST,
-                         None)            
-                          
+                         None)
+
         # Parse and handle errors
         if (http_status > 399):
             raise CertificateOperationError(error=_('Error in approving request (%s)') % \
                       http_reason_phrase)
-        
+
     def reject_recovery_request(self, request_id):
         """
         :param recovery_request_id:  identifier of key recovery request
-        
+
         Reject recovery request
         """
         self.debug('%s.reject_recovery_request()', self.fullname)
         if request_id == None:
             raise CertificateOperationError(error=_('Bad argument to reject_recovery_request'))
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
-            self._request('/kra/rest/agent/keyrequests/'+request_id+'/reject',
+            self._request('/kra/rest/agent/keyrequests/' + request_id + '/reject',
                          self.kra_agent_port,
                          self.POST,
-                         None)            
-                          
+                         None)
+
         # Parse and handle errors
         if (http_status > 399):
             raise CertificateOperationError(error=_('Error in rejecting request (%s)') % \
                       http_reason_phrase)
-    
+
     def cancel_recovery_request(self, request_id):
         """
         :param recovery_request_id:  identifier of key recovery request
-        
+
         Cancel recovery request
         """
         self.debug('%s.cancel_recovery_request()', self.fullname)
         if request_id == None:
             raise CertificateOperationError(error=_('Bad argument to cancel_recovery_request'))
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
-            self._request('/kra/rest/agent/keyrequests/'+request_id+'/cancel',
+            self._request('/kra/rest/agent/keyrequests/' + request_id + '/cancel',
                          self.kra_agent_port,
                          self.POST,
-                         None)            
-                          
+                         None)
+
         # Parse and handle errors
         if (http_status > 399):
             raise CertificateOperationError(error=_('Error in cancelling request (%s)') % \
                       http_reason_phrase)
-             
+
     def retrieve_security_data(self, recovery_request_id, passphrase=None):
         """
         :param recovery_request_id:  identifier of key recovery request
         :param passphrase:           passphrase to be used to wrap the data
-        
-        Recover the passphrase or symmetric key.  We require an approved 
-        recovery request.  
-        
-        If a passphrase is provided, the DRM will return a blob that can be decrypted 
+
+        Recover the passphrase or symmetric key.  We require an approved
+        recovery request.
+
+        If a passphrase is provided, the DRM will return a blob that can be decrypted
         with the passphrase.  If not, then a symmetric key will be created to wrap the
         data for transport to this server.  Upon receipt, the data will be unwrapped
         and returned unencrypted.
-        
-        The command returns a dict with the values described in parse_key_data_xml(), 
-        as well as the following field 
-        
+
+        The command returns a dict with the values described in parse_key_data_xml(),
+        as well as the following field
+
         +-----------------+---------------+-------------------------------------- +
         |result name      |result type    |comments                               |
         +=================+===============+=======================================+
@@ -876,14 +876,14 @@ class kra:
         +-----------------+---------------+---------------------------------------+
     	"""
         self.debug('%s.retrieve_security_data()', self.fullname)
-        
+
         if recovery_request_id == None:
             raise CertificateOperationError(error=_('Bad arguments to retrieve_security_data'))
-        
+
         # generate symmetric key
         slot = nss.get_best_slot(self.mechanism)
         session_key = slot.key_gen(self.mechanism, None, slot.get_best_key_length(self.mechanism))
-            
+
         # wrap this key with the transport cert
         public_key = self.transport_cert.subject_public_key_info.public_key
         wrapped_session_key = base64.b64encode(nss.pub_wrap_sym_key(self.mechanism, public_key, session_key))
@@ -891,44 +891,44 @@ class kra:
         if passphrase != None:
             # wrap passphrase with session key
             wrapped_session_key = base64.b64encode(self.symmetric_wrap(passphrase, session_key))
-        
+
         request = self.create_recovery_request(None, recovery_request_id,
                                                wrapped_session_key,
                                                wrapped_passphrase)
-        
-        #Call CMS
+
+        # Call CMS
         http_status, http_reason_phrase, http_headers, http_body = \
             self._request('/kra/rest/agent/keys/retrieve',
                          self.kra_agent_port,
                          self.POST,
-                         etree.tostring(request.getroot(), encoding='UTF-8'))            
-                          
+                         etree.tostring(request.getroot(), encoding='UTF-8'))
+
         # Parse and handle errors
         if (http_status != 200):
             raise CertificateOperationError(error=_('Error in retrieving security data (%s)') % \
                       http_reason_phrase)
 
         parse_result = self.get_parse_result_xml(http_body, parse_key_data_xml)
-        
+
         if passphrase == None:
             iv = nss.data_to_hex(base64.decodestring(parse_result['nonce_data']))
             parse_result['data'] = self.symmetric_unwrap(base64.decodestring(parse_result['wrapped_data']),
                                                          session_key, iv)
-        
+
         return parse_result
-           
+
     def recover_security_data(self, key_id, passphrase=None):
         """
         :param key_id:      identifier of key to be recovered
         :param passphrase:  passphrase to wrap key data for delivery outside of this server
-        
+
         Recover the key data (symmetric key or passphrase) in a one step process.
         This is the case when only one approver is required to extract a key such that
         the agent submitting the recovery request is the only approver required.
-        
+
         In this case, the request is automatically approved, and the KRA just returns the
         key data.
-        
+
         This has not yet been implemented on the server
         """
         self.debug('%s.recover_security_data()', self.fullname)
@@ -939,7 +939,7 @@ import argparse
 
 parser = argparse.ArgumentParser(description="Sample Test execution")
 parser.add_argument('-d', default='/tmp/drmtest', dest='work_dir', help='Working directory')
-parser.add_argument('--options', default='options.out', dest='options_file', 
+parser.add_argument('--options', default='options.out', dest='options_file',
                     help='File containing test PKIArchiveOptions to be archived')
 parser.add_argument('--symkey', default='symkey.out', dest='symkey_file',
                     help='File containing test symkey')
@@ -966,18 +966,18 @@ print requests
 transport_cert = test_kra.get_transport_cert()
 print transport_cert
 
-#archive symmetric key
+# archive symmetric key
 f = open(work_dir + "/" + options_file)
-wrapped_key = f.read() 
+wrapped_key = f.read()
 client_id = "Python symmetric key " + datetime.now().strftime("%Y-%m-%d %H:%M")
-response = test_kra.archive_security_data(client_id, wrapped_key,"symmetricKey")
+response = test_kra.archive_security_data(client_id, wrapped_key, "symmetricKey")
 print response
 
 # list keys with client_id
 response = test_kra.list_security_data(client_id, "active")
 print response
 
-#create recovery request
+# create recovery request
 key_id = response.keys()[0]
 print key_id
 response = test_kra.submit_recovery_request(key_id)
@@ -1003,7 +1003,7 @@ response = test_kra.retrieve_security_data(request_id)
 print response
 print "retrieved data is " + base64.encodestring(response['data'])
 
-#read original symkey from file
+# read original symkey from file
 f = open(work_dir + "/" + symkey_file)
 orig_key = f.read()
 print "orig key is " + orig_key
@@ -1011,4 +1011,4 @@ print "orig key is " + orig_key
 if orig_key.strip() == base64.encodestring(response['data']).strip():
     print "Success: the keys match"
 else:
-    print "Failure: keys do not match" 
+    print "Failure: keys do not match"
diff --git a/base/server/python/pki/server/__init__.py b/base/server/python/pki/server/__init__.py
index 759b01836699ff7074bde5ab74d39eabfd6b4e2c..c60c5a325d56d9d7de06d6052ef1fecd6da06196 100644
--- a/base/server/python/pki/server/__init__.py
+++ b/base/server/python/pki/server/__init__.py
@@ -25,8 +25,8 @@ import os
 import pki
 
 INSTANCE_BASE_DIR = '/var/lib/pki'
-REGISTRY_DIR      = '/etc/sysconfig/pki'
-SUBSYSTEM_TYPES   = ['ca', 'kra', 'ocsp', 'tks']
+REGISTRY_DIR = '/etc/sysconfig/pki'
+SUBSYSTEM_TYPES = ['ca', 'kra', 'ocsp', 'tks']
 
 
 class PKISubsystem(object):
@@ -84,7 +84,7 @@ class PKIInstance(object):
 
 class PKIServerException(pki.PKIException):
 
-    def __init__(self, message, exception=None,\
+    def __init__(self, message, exception=None, \
                  instance=None, subsystem=None):
 
         pki.PKIException.__init__(self, message, exception)
diff --git a/base/server/python/pki/server/upgrade.py b/base/server/python/pki/server/upgrade.py
index 940dbe44adf2a297a2912e444cd481425de03ac5..5de961df398f28d05e3f05d82c715afb6f6c2d02 100644
--- a/base/server/python/pki/server/upgrade.py
+++ b/base/server/python/pki/server/upgrade.py
@@ -28,10 +28,10 @@ import pki.server
 
 from pki.upgrade import verbose
 
-UPGRADE_DIR       = pki.SHARE_DIR + '/server/upgrade'
-BACKUP_DIR        = pki.LOG_DIR + '/server/upgrade'
+UPGRADE_DIR = pki.SHARE_DIR + '/server/upgrade'
+BACKUP_DIR = pki.LOG_DIR + '/server/upgrade'
 
-INSTANCE_TRACKER  = '%s/tomcat.conf'
+INSTANCE_TRACKER = '%s/tomcat.conf'
 SUBSYSTEM_TRACKER = '%s/CS.cfg'
 
 
@@ -168,8 +168,8 @@ class PKIServerUpgrader(pki.upgrade.PKIUpgrader):
 
         list = []
 
-        if not self.instanceType or self.instanceType >=10:
-            if os.path.exists(os.path.join(pki.server.REGISTRY_DIR,'tomcat')):
+        if not self.instanceType or self.instanceType >= 10:
+            if os.path.exists(os.path.join(pki.server.REGISTRY_DIR, 'tomcat')):
                 for instanceName in os.listdir(pki.server.INSTANCE_BASE_DIR):
                     if not self.instanceName or \
                         self.instanceName == instanceName:
diff --git a/base/server/src/engine/pkiconfig.py b/base/server/src/engine/pkiconfig.py
index 3a3a7df18f376a13ea61477618876aa5eebf4d42..a0e5bb2ba503afeb1cb76457389511b4520e3768 100644
--- a/base/server/src/engine/pkiconfig.py
+++ b/base/server/src/engine/pkiconfig.py
@@ -37,10 +37,10 @@ PKI_DEPLOYMENT_DEFAULT_SHELL = "/sbin/nologin"
 PKI_DEPLOYMENT_DEFAULT_UID = 17
 PKI_DEPLOYMENT_DEFAULT_USER = "pkiuser"
 
-PKI_SUBSYSTEMS = ["CA","KRA","OCSP","RA","TKS","TPS"]
-PKI_SIGNED_AUDIT_SUBSYSTEMS = ["CA","KRA","OCSP","TKS","TPS"]
-PKI_APACHE_SUBSYSTEMS = ["RA","TPS"]
-PKI_TOMCAT_SUBSYSTEMS = ["CA","KRA","OCSP","TKS"]
+PKI_SUBSYSTEMS = ["CA", "KRA", "OCSP", "RA", "TKS", "TPS"]
+PKI_SIGNED_AUDIT_SUBSYSTEMS = ["CA", "KRA", "OCSP", "TKS", "TPS"]
+PKI_APACHE_SUBSYSTEMS = ["RA", "TPS"]
+PKI_TOMCAT_SUBSYSTEMS = ["CA", "KRA", "OCSP", "TKS"]
 PKI_BASE_RESERVED_NAMES = ["alias", "bin", "ca", "common", "conf", "kra",
                            "lib", "logs", "ocsp", "temp", "tks", "webapps",
                            "work"]
@@ -78,9 +78,9 @@ PKI_DEPLOYMENT_DEFAULT_TOMCAT_INSTANCE_NAME = "pki-tomcat"
 DEFAULT_DEPLOYMENT_CONFIGURATION = "default.cfg"
 USER_DEPLOYMENT_CONFIGURATION = "deployment.cfg"
 
-PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE =\
+PKI_DEPLOYMENT_DEFAULT_CONFIGURATION_FILE = \
     PKI_DEPLOYMENT_CONFIGURATION_ROOT + "/" + DEFAULT_DEPLOYMENT_CONFIGURATION
-PKI_DEPLOYMENT_SLOTS_CONFIGURATION_FILE =\
+PKI_DEPLOYMENT_SLOTS_CONFIGURATION_FILE = \
     PKI_DEPLOYMENT_SOURCE_ROOT + "/deployment/config/pkislots.cfg"
 
 # subtypes of PKI subsystems
@@ -174,8 +174,8 @@ pki_slots_dict = None
 
 # PKI Selinux Constants and parameters
 PKI_INSTANCE_SELINUX_CONTEXT = "pki_tomcat_var_lib_t"
-PKI_LOG_SELINUX_CONTEXT      = "pki_tomcat_log_t"
-PKI_CFG_SELINUX_CONTEXT      = "pki_tomcat_etc_rw_t"
-PKI_CERTDB_SELINUX_CONTEXT   = "pki_tomcat_cert_t"
-PKI_PORT_SELINUX_CONTEXT     = "http_port_t"
+PKI_LOG_SELINUX_CONTEXT = "pki_tomcat_log_t"
+PKI_CFG_SELINUX_CONTEXT = "pki_tomcat_etc_rw_t"
+PKI_CERTDB_SELINUX_CONTEXT = "pki_tomcat_cert_t"
+PKI_PORT_SELINUX_CONTEXT = "http_port_t"
 pki_selinux_config_ports = []
diff --git a/base/server/src/engine/pkihelper.py b/base/server/src/engine/pkihelper.py
index 5c43e9d91fad1d5f316cf97e5f8e7cb1f398c4fe..b0cda38e1ec896d38f69b98e59e9a0c34710ae27 100644
--- a/base/server/src/engine/pkihelper.py
+++ b/base/server/src/engine/pkihelper.py
@@ -59,7 +59,7 @@ import pki.client
 import pki.system
 
 # PKI Deployment Helper Functions
-def pki_copytree(src, dst, symlinks = False, ignore = None):
+def pki_copytree(src, dst, symlinks=False, ignore=None):
     """Recursively copy a directory tree using copy2().
 
     PATCH:  This code was copied from 'shutil.py' and patched to
@@ -140,18 +140,18 @@ class Identity:
             pki_gid = getgrnam(pki_group)[2]
             # Yes, group 'pki_group' exists!
             config.pki_log.info(log.PKIHELPER_GROUP_ADD_2, pki_group, pki_gid,
-                                extra = config.PKI_INDENTATION_LEVEL_2)
+                                extra=config.PKI_INDENTATION_LEVEL_2)
         except KeyError as exc:
             # No, group 'pki_group' does not exist!
             config.pki_log.debug(log.PKIHELPER_GROUP_ADD_KEYERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             try:
                 # Is the default well-known GID already defined?
                 group = getgrgid(config.PKI_DEPLOYMENT_DEFAULT_GID)[0]
                 # Yes, the default well-known GID exists!
                 config.pki_log.info(log.PKIHELPER_GROUP_ADD_DEFAULT_2,
                                     group, config.PKI_DEPLOYMENT_DEFAULT_GID,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 # Attempt to create 'pki_group' using a random GID.
                 command = "/usr/sbin/groupadd" + " " + \
                           pki_group + " " + \
@@ -159,7 +159,7 @@ class Identity:
             except KeyError as exc:
                 # No, the default well-known GID does not exist!
                 config.pki_log.debug(log.PKIHELPER_GROUP_ADD_GID_KEYERROR_1,
-                                     exc, extra = config.PKI_INDENTATION_LEVEL_2)
+                                     exc, extra=config.PKI_INDENTATION_LEVEL_2)
                 # Is the specified 'pki_group' the default well-known group?
                 if pki_group == config.PKI_DEPLOYMENT_DEFAULT_GROUP:
                     # Yes, attempt to create the default well-known group
@@ -176,10 +176,10 @@ class Identity:
                               pki_group + " " + \
                               "> /dev/null 2>&1"
             # Execute this "groupadd" command.
-            subprocess.call(command, shell = True)
+            subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return
 
@@ -192,19 +192,19 @@ class Identity:
             pki_uid = getpwnam(pki_user)[2]
             # Yes, user 'pki_user' exists!
             config.pki_log.info(log.PKIHELPER_USER_ADD_2, pki_user, pki_uid,
-                                extra = config.PKI_INDENTATION_LEVEL_2)
+                                extra=config.PKI_INDENTATION_LEVEL_2)
             # NOTE:  For now, never check validity of specified 'pki_group'!
         except KeyError as exc:
             # No, user 'pki_user' does not exist!
             config.pki_log.debug(log.PKIHELPER_USER_ADD_KEYERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             try:
                 # Is the default well-known UID already defined?
                 user = getpwuid(config.PKI_DEPLOYMENT_DEFAULT_UID)[0]
                 # Yes, the default well-known UID exists!
                 config.pki_log.info(log.PKIHELPER_USER_ADD_DEFAULT_2,
                                     user, config.PKI_DEPLOYMENT_DEFAULT_UID,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 # Attempt to create 'pki_user' using a random UID.
                 command = "/usr/sbin/useradd" + " " + \
                           "-g" + " " + \
@@ -220,7 +220,7 @@ class Identity:
             except KeyError as exc:
                 # No, the default well-known UID does not exist!
                 config.pki_log.debug(log.PKIHELPER_USER_ADD_UID_KEYERROR_1,
-                                     exc, extra = config.PKI_INDENTATION_LEVEL_2)
+                                     exc, extra=config.PKI_INDENTATION_LEVEL_2)
                 # Is the specified 'pki_user' the default well-known user?
                 if pki_user == config.PKI_DEPLOYMENT_DEFAULT_USER:
                     # Yes, attempt to create the default well-known user
@@ -253,13 +253,13 @@ class Identity:
                               pki_user + " " + \
                               "> /dev/null 2>&1"
             # Execute this "useradd" command.
-            subprocess.call(command, shell = True)
+            subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return
-    
+
     @staticmethod
     def add_uid_and_gid(pki_user, pki_group):
         "Add both User ID and Group ID"
@@ -268,61 +268,61 @@ class Identity:
         return
 
     @staticmethod
-    def get_uid(critical_failure = True):
+    def get_uid(critical_failure=True):
         "Fetch the user id."
         try:
             pki_uid = master['pki_uid']
         except KeyError as exc:
             config.pki_log.error(log.PKI_KEYERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return pki_uid
 
     @staticmethod
-    def get_gid(critical_failure = True):
+    def get_gid(critical_failure=True):
         "Fetch the group id."
         try:
             pki_gid = master['pki_gid']
         except KeyError as exc:
             config.pki_log.error(log.PKI_KEYERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return pki_gid
 
     @staticmethod
-    def set_uid(name, critical_failure = True):
+    def set_uid(name, critical_failure=True):
         "Modify the user id."
         try:
             config.pki_log.debug(log.PKIHELPER_USER_1, name,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             # id -u <name>
             pki_uid = getpwnam(name)[2]
             master['pki_uid'] = pki_uid
             config.pki_log.debug(log.PKIHELPER_UID_2, name, pki_uid,
-                                 extra = config.PKI_INDENTATION_LEVEL_3)
+                                 extra=config.PKI_INDENTATION_LEVEL_3)
         except KeyError as exc:
             config.pki_log.error(log.PKI_KEYERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return pki_uid
 
     @staticmethod
-    def set_gid(name, critical_failure = True):
+    def set_gid(name, critical_failure=True):
         "Modify the group id."
         try:
             config.pki_log.debug(log.PKIHELPER_GROUP_1, name,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             # id -g <name>
             pki_gid = getgrnam(name)[2]
             master['pki_gid'] = pki_gid
             config.pki_log.debug(log.PKIHELPER_GID_2, name, pki_gid,
-                                 extra = config.PKI_INDENTATION_LEVEL_3)
+                                 extra=config.PKI_INDENTATION_LEVEL_3)
         except KeyError as exc:
             config.pki_log.error(log.PKI_KEYERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return pki_gid
@@ -343,7 +343,7 @@ class Namespace:
                     log.PKIHELPER_NAMESPACE_COLLISION_2,
                     master['pki_instance_name'],
                     master['pki_instance_path'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                     master['pki_instance_path']))
         else:
@@ -353,7 +353,7 @@ class Namespace:
                     log.PKIHELPER_NAMESPACE_COLLISION_2,
                     master['pki_instance_name'],
                     master['pki_target_tomcat_conf_instance_id'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                       master['pki_target_tomcat_conf_instance_id']))
             if os.path.exists(master['pki_cgroup_systemd_service']):
@@ -362,7 +362,7 @@ class Namespace:
                     log.PKIHELPER_NAMESPACE_COLLISION_2,
                     master['pki_instance_name'],
                     master['pki_cgroup_systemd_service_path'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                       master['pki_cgroup_systemd_service_path']))
             if os.path.exists(master['pki_cgroup_cpu_systemd_service']):
@@ -371,7 +371,7 @@ class Namespace:
                     log.PKIHELPER_NAMESPACE_COLLISION_2,
                     master['pki_instance_name'],
                     master['pki_cgroup_cpu_systemd_service_path'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                       master['pki_cgroup_cpu_systemd_service_path']))
         if os.path.exists(master['pki_instance_log_path']) and\
@@ -381,7 +381,7 @@ class Namespace:
                 log.PKIHELPER_NAMESPACE_COLLISION_2,
                 master['pki_instance_name'],
                 master['pki_instance_log_path'],
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                   master['pki_instance_log_path']))
         if os.path.exists(master['pki_instance_configuration_path']) and\
@@ -391,7 +391,7 @@ class Namespace:
                 log.PKIHELPER_NAMESPACE_COLLISION_2,
                 master['pki_instance_name'],
                 master['pki_instance_configuration_path'],
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                   master['pki_instance_configuration_path']))
         if os.path.exists(master['pki_instance_registry_path']) and\
@@ -401,7 +401,7 @@ class Namespace:
                 log.PKIHELPER_NAMESPACE_COLLISION_2,
                 master['pki_instance_name'],
                 master['pki_instance_registry_path'],
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             raise Exception(log.PKIHELPER_NAMESPACE_COLLISION_2 % (master['pki_instance_name'],
                                                                   master['pki_instance_registry_path']))
         # Run simple checks for reserved name namespace collisions
@@ -411,7 +411,7 @@ class Namespace:
                 log.PKIHELPER_NAMESPACE_RESERVED_NAME_2,
                 master['pki_instance_name'],
                 master['pki_instance_path'],
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             raise Exception(log.PKIHELPER_NAMESPACE_RESERVED_NAME_2 % (master['pki_instance_name'],
                                                                       master['pki_instance_path']))
         # No need to check for reserved name under Top-Level PKI log path
@@ -421,7 +421,7 @@ class Namespace:
                 log.PKIHELPER_NAMESPACE_RESERVED_NAME_2,
                 master['pki_instance_name'],
                 master['pki_instance_configuration_path'],
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             raise Exception(log.PKIHELPER_NAMESPACE_RESERVED_NAME_2 % (master['pki_instance_name'],
                                                                       master['pki_instance_configuration_path']))
         if master['pki_subsystem'] in config.PKI_APACHE_SUBSYSTEMS:
@@ -432,7 +432,7 @@ class Namespace:
                     log.PKIHELPER_NAMESPACE_RESERVED_NAME_2,
                     master['pki_instance_name'],
                     master['pki_instance_registry_path'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_NAMESPACE_RESERVED_NAME_2 % (master['pki_instance_name'],
                                                                           master['pki_instance_registry_path']))
         elif master['pki_subsystem'] in config.PKI_TOMCAT_SUBSYSTEMS:
@@ -443,7 +443,7 @@ class Namespace:
                     log.PKIHELPER_NAMESPACE_RESERVED_NAME_2,
                     master['pki_instance_name'],
                     master['pki_instance_registry_path'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_NAMESPACE_RESERVED_NAME_2 % (master['pki_instance_name'],
                                                                           master['pki_instance_registry_path']))
 
@@ -451,17 +451,17 @@ class Namespace:
 # PKI Deployment Configuration File Class
 class Configuration_file:
     """PKI Deployment Configuration File Class"""
-    
+
     @staticmethod
     def log_configuration_url():
         # NOTE:  This is the one and only parameter containing a sensitive
         #        parameter that may be stored in a log file.
         config.pki_log.info(log.PKI_CONFIGURATION_WIZARD_URL_1,
                             master['pki_configuration_url'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
         config.pki_log.info(log.PKI_CONFIGURATION_WIZARD_RESTART_1,
                             master['pki_registry_initscript_command'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
 
     @staticmethod
     def display_configuration_url():
@@ -484,7 +484,7 @@ class Configuration_file:
                     log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                     "pki_ds_password",
                     master['pki_user_deployment_cfg'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ds_password",
                                                                                      master['pki_user_deployment_cfg']))
             # Verify existence of Admin Password (except for Clones)
@@ -495,7 +495,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_admin_password",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_admin_password",
                                                                                          master['pki_user_deployment_cfg']))
             # If required, verify existence of Backup Password
@@ -506,7 +506,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_backup_password",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_backup_password",
                                                                                          master['pki_user_deployment_cfg']))
             # Verify existence of Client Pin for NSS client security databases
@@ -516,7 +516,7 @@ class Configuration_file:
                     log.PKIHELPER_UNDEFINED_CLIENT_DATABASE_PASSWORD_2,
                     "pki_client_database_password",
                     master['pki_user_deployment_cfg'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_UNDEFINED_CLIENT_DATABASE_PASSWORD_2 % ("pki_client_database_password",
                                                                                      master['pki_user_deployment_cfg']))
             # Verify existence of Client PKCS #12 Password for Admin Cert
@@ -526,7 +526,7 @@ class Configuration_file:
                     log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                     "pki_client_pkcs12_password",
                     master['pki_user_deployment_cfg'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_client_pkcs12_password",
                                                                                      master['pki_user_deployment_cfg']))
             # Verify existence of PKCS #12 Password (ONLY for Clones)
@@ -537,7 +537,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_clone_pkcs12_password",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_clone_pkcs12_password",
                                                                                          master['pki_user_deployment_cfg']))
             # Verify existence of Security Domain Password File
@@ -551,7 +551,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_security_domain_password",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_security_domain_password",
                                                                                           master['pki_user_deployment_cfg']))
             # If required, verify existence of Token Password
@@ -562,7 +562,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_token_password",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_token_password",
                                                                                          master['pki_user_deployment_cfg']))
         return
@@ -578,28 +578,28 @@ class Configuration_file:
                     config.pki_log.error(
                         log.PKIHELPER_MUTUALLY_EXCLUSIVE_CLONE_EXTERNAL_SUB_CA,
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_MUTUALLY_EXCLUSIVE_CLONE_EXTERNAL_SUB_CA % master['pki_user_deployment_cfg'])
                 elif config.str2bool(master['pki_clone']) and\
                      config.str2bool(master['pki_external']):
                     config.pki_log.error(
                         log.PKIHELPER_MUTUALLY_EXCLUSIVE_CLONE_EXTERNAL_CA,
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_MUTUALLY_EXCLUSIVE_CLONE_EXTERNAL_CA % master['pki_user_deployment_cfg'])
                 elif config.str2bool(master['pki_clone']) and\
                      config.str2bool(master['pki_subordinate']):
                     config.pki_log.error(
                         log.PKIHELPER_MUTUALLY_EXCLUSIVE_CLONE_SUB_CA,
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_MUTUALLY_EXCLUSIVE_CLONE_SUB_CA % master['pki_user_deployment_cfg'])
                 elif config.str2bool(master['pki_external']) and\
                      config.str2bool(master['pki_subordinate']):
                     config.pki_log.error(
                         log.PKIHELPER_MUTUALLY_EXCLUSIVE_EXTERNAL_SUB_CA,
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_MUTUALLY_EXCLUSIVE_EXTERNAL_SUB_CA % master['pki_user_deployment_cfg'])
 
     @staticmethod
@@ -623,7 +623,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_ds_base_dn",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ds_base_dn",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_ds_ldap_port') or\
@@ -635,7 +635,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_ds_ldap_port",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ds_ldap_port",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_ds_ldaps_port') or\
@@ -647,7 +647,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_ds_ldaps_port",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ds_ldaps_port",
                                                                                          master['pki_user_deployment_cfg']))
                 # NOTE:  Although this will be checked prior to getting to
@@ -664,7 +664,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_ajp_port",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ajp_port",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_http_port') or\
@@ -676,7 +676,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_http_port",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_http_port",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_https_port') or\
@@ -688,7 +688,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_https_port",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_https_port",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_tomcat_server_port') or\
@@ -700,7 +700,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_tomcat_server_port",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_tomcat_server_port",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_clone_pkcs12_path') or\
@@ -709,14 +709,14 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_clone_pkcs12_path",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_clone_pkcs12_path",
                                                                                          master['pki_user_deployment_cfg']))
                 elif not os.path.isfile(master['pki_clone_pkcs12_path']):
                     config.pki_log.error(
                         log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
                         master['pki_clone_pkcs12_path'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1 % "pki_clone_pkcs12_path")
                 if not master.has_key('pki_clone_replication_security') or\
                    not len(master['pki_clone_replication_security']):
@@ -724,7 +724,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_clone_replication_security",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_clone_replication_security",
                                                                                          master['pki_user_deployment_cfg']))
                 if not master.has_key('pki_clone_uri') or\
@@ -733,7 +733,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_clone_uri",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_clone_uri",
                                                                                          master['pki_user_deployment_cfg']))
             elif master['pki_subsystem'] == "CA" and\
@@ -744,7 +744,7 @@ class Configuration_file:
                         log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                         "pki_external_step_two",
                         master['pki_user_deployment_cfg'],
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_extrenal_step_two",
                                                                                           master['pki_user_deployment_cfg']))
                 if not config.str2bool(master['pki_external_step_two']):
@@ -755,7 +755,7 @@ class Configuration_file:
                             log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                             "pki_external_csr_path",
                             master['pki_user_deployment_cfg'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_extrenal_csr_path",
                                                                                               master['pki_user_deployment_cfg']))
                     elif os.path.exists(master['pki_external_csr_path']) and\
@@ -763,7 +763,7 @@ class Configuration_file:
                         config.pki_log.error(
                             log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
                             master['pki_external_csr_path'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % "pki_extrenal_csr_path")
                 else:
                     # External CA (Step 2)
@@ -773,7 +773,7 @@ class Configuration_file:
                             log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                             "pki_external_ca_cert_chain_path",
                             master['pki_user_deployment_cfg'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_extrenal_ca_cert_chain_path",
                                                                                               master['pki_user_deployment_cfg']))
                     elif os.path.exists(
@@ -783,7 +783,7 @@ class Configuration_file:
                         config.pki_log.error(
                             log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
                             master['pki_external_ca_cert_chain_path'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % "pki_extrenal_ca_cert_chain_path")
                     if not master.has_key('pki_external_ca_cert_path') or\
                        not len(master['pki_external_ca_cert_path']):
@@ -791,7 +791,7 @@ class Configuration_file:
                             log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2,
                             "pki_external_ca_cert_path",
                             master['pki_user_deployment_cfg'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_extrenal_ca_cert_path",
                                                                                               master['pki_user_deployment_cfg']))
                     elif os.path.exists(master['pki_external_ca_cert_path']) and\
@@ -800,7 +800,7 @@ class Configuration_file:
                         config.pki_log.error(
                             log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
                             master['pki_external_ca_cert_path'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % "pki_extrenal_ca_cert_path")
         return
 
@@ -830,7 +830,7 @@ class Configuration_file:
         if not bool(selinux.is_selinux_enabled()):
             config.pki_log.error(
                 log.PKIHELPER_SELINUX_DISABLED,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             return
 
         portrecs = seobject.portRecords().get_all()
@@ -857,7 +857,7 @@ class Configuration_file:
                 config.pki_log.error(
                         log.PKIHELPER_INVALID_SELINUX_CONTEXT_FOR_PORT,
                         port, context,
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_INVALID_SELINUX_CONTEXT_FOR_PORT % (port, context))
         return
 
@@ -872,7 +872,7 @@ class Configuration_file:
                     log.PKIHELPER_COMMAND_LINE_PARAMETER_MISMATCH_2,
                     master['pki_deployed_instance_name'],
                     master['pki_instance_name'],
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % (master['pki_deployed_instance_name'],
                                                                                       master['pki_instance_name']))
         return
@@ -915,7 +915,7 @@ class Configuration_file:
 # PKI Deployment Instance Class
 class Instance:
     """ PKI Deployment Instance Class """
-    
+
     @staticmethod
     def apache_instance_subsystems():
         rv = 0
@@ -928,13 +928,13 @@ class Instance:
                     rv = rv + 1
             config.pki_log.debug(log.PKIHELPER_APACHE_INSTANCE_SUBSYSTEMS_2,
                                  master['pki_instance_path'],
-                                 rv, extra = config.PKI_INDENTATION_LEVEL_2)
+                                 rv, extra=config.PKI_INDENTATION_LEVEL_2)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return rv
-    
+
     @staticmethod
     def apache_instances():
         rv = 0
@@ -956,10 +956,10 @@ class Instance:
             config.pki_log.debug(log.PKIHELPER_APACHE_INSTANCES_2,
                                  master['pki_instance_type_registry_path'],
                                  rv,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return rv
 
@@ -985,10 +985,10 @@ class Instance:
                                 rv = rv + 1
             config.pki_log.debug(log.PKIHELPER_PKI_INSTANCE_SUBSYSTEMS_2,
                                  master['pki_instance_path'], rv,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return rv
 
@@ -1003,10 +1003,10 @@ class Instance:
                     rv.append(subsystem)
         except OSErr as e:
             config.pki_log.error(log.PKI_OSERROR_1, str(e),
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return rv
- 
+
     @staticmethod
     def tomcat_instances():
         rv = 0
@@ -1028,10 +1028,10 @@ class Instance:
             config.pki_log.debug(log.PKIHELPER_TOMCAT_INSTANCES_2,
                                  master['pki_instance_type_registry_path'],
                                  rv,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return rv
 
@@ -1042,12 +1042,12 @@ class Instance:
                 config.pki_log.error(log.PKI_SUBSYSTEM_DOES_NOT_EXIST_2,
                                      master['pki_subsystem'],
                                      master['pki_instance_name'],
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_SUBSYSTEM_DOES_NOT_EXIST_2 % (master['pki_subsystem'],
                                                                       master['pki_instance_name']))
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
 
     @staticmethod
@@ -1057,35 +1057,35 @@ class Instance:
                 config.pki_log.error(log.PKI_SUBSYSTEM_ALREADY_EXISTS_2,
                                      master['pki_subsystem'],
                                      master['pki_instance_name'],
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_SUBSYSTEM_DOES_NOT_EXIST_2 % (master['pki_subsystem'],
                                                                       master['pki_instance_name']))
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
 
     @staticmethod
     def get_instance_status():
         connection = pki.client.PKIConnection(
-            protocol = 'https',
-            hostname = master['pki_hostname'],
-            port = master['pki_https_port'],
-            subsystem = master['pki_subsystem_type'],
-            accept = 'application/xml')
+            protocol='https',
+            hostname=master['pki_hostname'],
+            port=master['pki_https_port'],
+            subsystem=master['pki_subsystem_type'],
+            accept='application/xml')
 
         try:
             client = pki.system.SystemStatusClient(connection)
             response = client.getStatus()
             config.pki_log.debug(response,
-                extra = config.PKI_INDENTATION_LEVEL_3)
+                extra=config.PKI_INDENTATION_LEVEL_3)
 
             root = ET.fromstring(response)
             status = root.findtext("Status")
             return status
         except requests.exceptions.ConnectionError:
             config.pki_log.debug("No connection",
-                extra = config.PKI_INDENTATION_LEVEL_3)
+                extra=config.PKI_INDENTATION_LEVEL_3)
             return None
 
     @staticmethod
@@ -1103,19 +1103,19 @@ class Instance:
 class Directory:
     """PKI Deployment Directory Class"""
 
-    @staticmethod    
-    def create(name, uid = None, gid = None,
-               perms = config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
-               acls = None, critical_failure = True):
+    @staticmethod
+    def create(name, uid=None, gid=None,
+               perms=config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
+               acls=None, critical_failure=True):
         try:
             if not os.path.exists(name):
                 # mkdir -p <name>
                 config.pki_log.info(log.PKIHELPER_MKDIR_1, name,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 os.makedirs(name)
                 # chmod <perms> <name>
                 config.pki_log.debug(log.PKIHELPER_CHMOD_2, perms, name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(name, perms)
                 # chown <uid>:<gid> <name>
                 if uid == None:
@@ -1124,7 +1124,7 @@ class Directory:
                     gid = Identity.get_gid()
                 config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                      uid, gid, name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(name, uid, gid)
                 # Store record in installation manifest
                 record = manifest.record()
@@ -1140,7 +1140,7 @@ class Directory:
             elif not os.path.isdir(name):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_ALREADY_EXISTS_NOT_A_DIRECTORY_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_DIRECTORY_ALREADY_EXISTS_NOT_A_DIRECTORY_1 % name)
         except OSError as exc:
@@ -1148,31 +1148,31 @@ class Directory:
                 pass
             else:
                 config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise
         return
 
     @staticmethod
-    def modify(name, uid = None, gid = None,
-               perms = config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
-               acls = None, silent = False, critical_failure = True):
+    def modify(name, uid=None, gid=None,
+               perms=config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
+               acls=None, silent=False, critical_failure=True):
         try:
             if os.path.exists(name):
                 if not os.path.isdir(name):
                     config.pki_log.error(
                         log.PKI_DIRECTORY_ALREADY_EXISTS_NOT_A_DIRECTORY_1,
-                        name, extra = config.PKI_INDENTATION_LEVEL_2)
+                        name, extra=config.PKI_INDENTATION_LEVEL_2)
                     if critical_failure == True:
                         raise Exception(log.PKI_DIRECTORY_ALREADY_EXISTS_NOT_A_DIRECTORY_1 % name)
                 # Always re-process each directory whether it needs it or not
                 if not silent:
                     config.pki_log.info(log.PKIHELPER_MODIFY_DIR_1, name,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                 # chmod <perms> <name>
                 if not silent:
                     config.pki_log.debug(log.PKIHELPER_CHMOD_2, perms, name,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(name, perms)
                 # chown <uid>:<gid> <name>
                 if uid == None:
@@ -1182,7 +1182,7 @@ class Directory:
                 if not silent:
                     config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                          uid, gid, name,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(name, uid, gid)
                 # Store record in installation manifest
                 if not silent:
@@ -1199,38 +1199,38 @@ class Directory:
             else:
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % name)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def delete(name, recursive_flag = True, critical_failure = True):
+    def delete(name, recursive_flag=True, critical_failure=True):
         try:
             if not os.path.exists(name) or not os.path.isdir(name):
                 # Simply issue a warning and continue
                 config.pki_log.warning(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
             else:
                 if recursive_flag == True:
                     # rm -rf <name>
                     config.pki_log.info(log.PKIHELPER_RM_RF_1, name,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                     shutil.rmtree(name)
                 else:
                     # rmdir <name>
                     config.pki_log.info(log.PKIHELPER_RMDIR_1, name,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                     os.rmdir(name)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -1244,41 +1244,41 @@ class Directory:
                 return True
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
     @staticmethod
     def is_empty(name):
         try:
             if not os.listdir(name):
                 config.pki_log.debug(log.PKIHELPER_DIRECTORY_IS_EMPTY_1,
-                                     name, extra = config.PKI_INDENTATION_LEVEL_2)
+                                     name, extra=config.PKI_INDENTATION_LEVEL_2)
                 return True
             else:
                 config.pki_log.debug(log.PKIHELPER_DIRECTORY_IS_NOT_EMPTY_1,
-                                     name, extra = config.PKI_INDENTATION_LEVEL_2)
+                                     name, extra=config.PKI_INDENTATION_LEVEL_2)
                 return False
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
     @staticmethod
-    def set_mode(name, uid = None, gid = None,
-                 dir_perms = config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
-                 file_perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-                 symlink_perms = \
+    def set_mode(name, uid=None, gid=None,
+                 dir_perms=config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
+                 file_perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+                 symlink_perms=\
                      config.PKI_DEPLOYMENT_DEFAULT_SYMLINK_PERMISSIONS,
-                 dir_acls = None, file_acls = None, symlink_acls = None,
-                 recursive_flag = True, critical_failure = True):
+                 dir_acls=None, file_acls=None, symlink_acls=None,
+                 recursive_flag=True, critical_failure=True):
         try:
             if not os.path.exists(name) or not os.path.isdir(name):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % name)
             else:
                 config.pki_log.info(
                     log.PKIHELPER_SET_MODE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if uid == None:
                     uid = Identity.get_uid()
                 if gid == None:
@@ -1291,16 +1291,16 @@ class Directory:
                                 file = entity
                                 config.pki_log.debug(
                                     log.PKIHELPER_IS_A_FILE_1, file,
-                                    extra = config.PKI_INDENTATION_LEVEL_3)
+                                    extra=config.PKI_INDENTATION_LEVEL_3)
                                 # chmod <file_perms> <name>
                                 config.pki_log.debug(log.PKIHELPER_CHMOD_2,
                                     file_perms, file,
-                                    extra = config.PKI_INDENTATION_LEVEL_3)
+                                    extra=config.PKI_INDENTATION_LEVEL_3)
                                 os.chmod(file, file_perms)
                                 # chown <uid>:<gid> <name>
                                 config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                     uid, gid, file,
-                                    extra = config.PKI_INDENTATION_LEVEL_3)
+                                    extra=config.PKI_INDENTATION_LEVEL_3)
                                 os.chown(file, uid, gid)
                                 # Store record in installation manifest
                                 record = manifest.record()
@@ -1317,7 +1317,7 @@ class Directory:
                                 symlink = entity
                                 config.pki_log.debug(
                                     log.PKIHELPER_IS_A_SYMLINK_1, symlink,
-                                    extra = config.PKI_INDENTATION_LEVEL_3)
+                                    extra=config.PKI_INDENTATION_LEVEL_3)
                                 # REMINDER:  Due to POSIX compliance, 'lchmod'
                                 #            is NEVER implemented on Linux
                                 #            systems since 'chmod' CANNOT be
@@ -1326,7 +1326,7 @@ class Directory:
                                 # chown -h <uid>:<gid> <symlink>
                                 config.pki_log.debug(log.PKIHELPER_CHOWN_H_3,
                                     uid, gid, symlink,
-                                    extra = config.PKI_INDENTATION_LEVEL_3)
+                                    extra=config.PKI_INDENTATION_LEVEL_3)
                                 os.lchown(symlink, uid, gid)
                                 # Store record in installation manifest
                                 record = manifest.record()
@@ -1343,16 +1343,16 @@ class Directory:
                             dir = os.path.join(root, name)
                             config.pki_log.debug(
                                 log.PKIHELPER_IS_A_DIRECTORY_1, dir,
-                                extra = config.PKI_INDENTATION_LEVEL_3)
+                                extra=config.PKI_INDENTATION_LEVEL_3)
                             # chmod <dir_perms> <name>
                             config.pki_log.debug(log.PKIHELPER_CHMOD_2,
                                 dir_perms, dir,
-                                extra = config.PKI_INDENTATION_LEVEL_3)
+                                extra=config.PKI_INDENTATION_LEVEL_3)
                             os.chmod(dir, dir_perms)
                             # chown <uid>:<gid> <name>
                             config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                 uid, gid, dir,
-                                extra = config.PKI_INDENTATION_LEVEL_3)
+                                extra=config.PKI_INDENTATION_LEVEL_3)
                             os.chown(dir, uid, gid)
                             # Store record in installation manifest
                             record = manifest.record()
@@ -1368,17 +1368,17 @@ class Directory:
                 else:
                     config.pki_log.debug(
                         log.PKIHELPER_IS_A_DIRECTORY_1, name,
-                        extra = config.PKI_INDENTATION_LEVEL_3)
+                        extra=config.PKI_INDENTATION_LEVEL_3)
                     name = os.path.join(root, name)
                     # chmod <dir_perms> <name>
                     config.pki_log.debug(log.PKIHELPER_CHMOD_2,
                                          dir_perms, name,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                     os.chmod(name, dir_perms)
                     # chown <uid>:<gid> <name>
                     config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                          uid, gid, name,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                     os.chown(name, uid, gid)
                     # Store record in installation manifest
                     record = manifest.record()
@@ -1393,35 +1393,35 @@ class Directory:
                     manifest.database.append(record)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
 
     @staticmethod
-    def copy(old_name, new_name, uid = None, gid = None,
-             dir_perms = config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
-             file_perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-             symlink_perms = config.PKI_DEPLOYMENT_DEFAULT_SYMLINK_PERMISSIONS,
-             dir_acls = None, file_acls = None, symlink_acls = None,
-             recursive_flag = True, overwrite_flag = False, critical_failure = True):
+    def copy(old_name, new_name, uid=None, gid=None,
+             dir_perms=config.PKI_DEPLOYMENT_DEFAULT_DIR_PERMISSIONS,
+             file_perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+             symlink_perms=config.PKI_DEPLOYMENT_DEFAULT_SYMLINK_PERMISSIONS,
+             dir_acls=None, file_acls=None, symlink_acls=None,
+             recursive_flag=True, overwrite_flag=False, critical_failure=True):
         try:
             if not os.path.exists(old_name) or not os.path.isdir(old_name):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, old_name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % old_name)
             else:
                 if os.path.exists(new_name):
                     if not overwrite_flag:
                         config.pki_log.error(
                             log.PKI_DIRECTORY_ALREADY_EXISTS_1, new_name,
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKI_DIRECTORY_ALREADY_EXISTS_1 % new_name)
                 if recursive_flag == True:
                     # cp -rp <old_name> <new_name>
                     config.pki_log.info(log.PKIHELPER_CP_RP_2,
                                         old_name, new_name,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                     # Due to a limitation in the 'shutil.copytree()'
                     # implementation which requires that
                     # 'The destination directory must not already exist.',
@@ -1434,7 +1434,7 @@ class Directory:
                     # cp -p <old_name> <new_name>
                     config.pki_log.info(log.PKIHELPER_CP_P_2,
                                         old_name, new_name,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                     shutil.copy2(old_name, new_name)
                 # set ownerships, permissions, and acls
                 # of newly created top-level directory
@@ -1448,12 +1448,12 @@ class Directory:
                               recursive_flag, critical_failure)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except shutil.Error as exc:
             config.pki_log.error(log.PKI_SHUTIL_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -1462,18 +1462,18 @@ class Directory:
 class File:
     """PKI Deployment File Class (also used for executables)"""
     @staticmethod
-    def create(name, uid = None, gid = None,
-               perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-               acls = None, critical_failure = True):
+    def create(name, uid=None, gid=None,
+               perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+               acls=None, critical_failure=True):
         try:
             if not os.path.exists(name):
                 # touch <name>
                 config.pki_log.info(log.PKIHELPER_TOUCH_1, name,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 open(name, "w").close()
                 # chmod <perms> <name>
                 config.pki_log.debug(log.PKIHELPER_CHMOD_2, perms, name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(name, perms)
                 # chown <uid>:<gid> <name>
                 if uid == None:
@@ -1482,7 +1482,7 @@ class File:
                     gid = Identity.get_gid()
                 config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                      uid, gid, name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(name, uid, gid)
                 # Store record in installation manifest
                 record = manifest.record()
@@ -1498,7 +1498,7 @@ class File:
             elif not os.path.isfile(name):
                 config.pki_log.error(
                     log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1 % name)
         except OSError as exc:
@@ -1506,31 +1506,31 @@ class File:
                 pass
             else:
                 config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise
         return
 
     @staticmethod
-    def modify(name, uid = None, gid = None,
-               perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-               acls = None, silent = False, critical_failure = True):
+    def modify(name, uid=None, gid=None,
+               perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+               acls=None, silent=False, critical_failure=True):
         try:
             if os.path.exists(name):
                 if not os.path.isfile(name):
                     config.pki_log.error(
                         log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1,
-                        name, extra = config.PKI_INDENTATION_LEVEL_2)
+                        name, extra=config.PKI_INDENTATION_LEVEL_2)
                     if critical_failure == True:
                         raise Exception(log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1 % name)
                 # Always re-process each file whether it needs it or not
                 if not silent:
                     config.pki_log.info(log.PKIHELPER_MODIFY_FILE_1, name,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                 # chmod <perms> <name>
                 if not silent:
                     config.pki_log.debug(log.PKIHELPER_CHMOD_2, perms, name,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(name, perms)
                 # chown <uid>:<gid> <name>
                 if uid == None:
@@ -1540,7 +1540,7 @@ class File:
                 if not silent:
                     config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                          uid, gid, name,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(name, uid, gid)
                 # Store record in installation manifest
                 if not silent:
@@ -1557,32 +1557,32 @@ class File:
             else:
                 config.pki_log.error(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % name)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def delete(name, critical_failure = True):
+    def delete(name, critical_failure=True):
         try:
             if not os.path.exists(name) or not os.path.isfile(name):
                 # Simply issue a warning and continue
                 config.pki_log.warning(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
             else:
                 # rm -f <name>
                 config.pki_log.info(log.PKIHELPER_RM_F_1, name,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 os.remove(name)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -1596,30 +1596,30 @@ class File:
                 return True
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
 
     @staticmethod
-    def copy(old_name, new_name, uid = None, gid = None,
-             perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS, acls = None,
-             overwrite_flag = False, critical_failure = True):
+    def copy(old_name, new_name, uid=None, gid=None,
+             perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS, acls=None,
+             overwrite_flag=False, critical_failure=True):
         try:
             if not os.path.exists(old_name) or not os.path.isfile(old_name):
                 config.pki_log.error(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, old_name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % old_name)
             else:
                 if os.path.exists(new_name):
                     if not overwrite_flag:
                         config.pki_log.error(
                             log.PKI_FILE_ALREADY_EXISTS_1, new_name,
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKI_FILE_ALREADY_EXISTS_1 % new_name)
                 # cp -p <old_name> <new_name>
                 config.pki_log.info(log.PKIHELPER_CP_P_2,
                                     old_name, new_name,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 shutil.copy2(old_name, new_name)
                 if uid == None:
                     uid = Identity.get_uid()
@@ -1628,12 +1628,12 @@ class File:
                 # chmod <perms> <new_name>
                 config.pki_log.debug(log.PKIHELPER_CHMOD_2,
                                      perms, new_name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(new_name, perms)
                 # chown <uid>:<gid> <new_name>
                 config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                      uid, gid, new_name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(new_name, uid, gid)
                 # Store record in installation manifest
                 record = manifest.record()
@@ -1648,38 +1648,38 @@ class File:
                 manifest.database.append(record)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except shutil.Error as exc:
             config.pki_log.error(log.PKI_SHUTIL_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
     def apply_slot_substitution(
-                         name, uid = None, gid = None,
-                         perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-                         acls = None, critical_failure = True):
+                         name, uid=None, gid=None,
+                         perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+                         acls=None, critical_failure=True):
         try:
             if not os.path.exists(name) or not os.path.isfile(name):
                 config.pki_log.error(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % name)
             # applying in-place slot substitutions on <name>
             config.pki_log.info(log.PKIHELPER_APPLY_SLOT_SUBSTITUTION_1,
                                 name,
-                                extra = config.PKI_INDENTATION_LEVEL_2)
-            for line in fileinput.FileInput(name, inplace = 1):
+                                extra=config.PKI_INDENTATION_LEVEL_2)
+            for line in fileinput.FileInput(name, inplace=1):
                 for slot in slots:
                     if slot != '__name__' and slots[slot] in line:
                         config.pki_log.debug(
                             log.PKIHELPER_SLOT_SUBSTITUTION_2,
                             slots[slot], master[slot],
-                            extra = config.PKI_INDENTATION_LEVEL_3)
+                            extra=config.PKI_INDENTATION_LEVEL_3)
                         line = line.replace(slots[slot], master[slot])
                 sys.stdout.write(line)
             if uid == None:
@@ -1689,12 +1689,12 @@ class File:
             # chmod <perms> <name>
             config.pki_log.debug(log.PKIHELPER_CHMOD_2,
                                  perms, name,
-                                 extra = config.PKI_INDENTATION_LEVEL_3)
+                                 extra=config.PKI_INDENTATION_LEVEL_3)
             os.chmod(name, perms)
             # chown <uid>:<gid> <name>
             config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                  uid, gid, name,
-                                 extra = config.PKI_INDENTATION_LEVEL_3)
+                                 extra=config.PKI_INDENTATION_LEVEL_3)
             os.chown(name, uid, gid)
             # Store record in installation manifest
             record = manifest.record()
@@ -1709,39 +1709,39 @@ class File:
             manifest.database.append(record)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except shutil.Error as exc:
             config.pki_log.error(log.PKI_SHUTIL_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
     def copy_with_slot_substitution(
-                         old_name, new_name, uid = None, gid = None,
-                         perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-                         acls = None, overwrite_flag = False,
-                         critical_failure = True):
+                         old_name, new_name, uid=None, gid=None,
+                         perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+                         acls=None, overwrite_flag=False,
+                         critical_failure=True):
         try:
             if not os.path.exists(old_name) or not os.path.isfile(old_name):
                 config.pki_log.error(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, old_name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % old_name)
             else:
                 if os.path.exists(new_name):
                     if not overwrite_flag:
                         config.pki_log.error(
                             log.PKI_FILE_ALREADY_EXISTS_1, new_name,
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKI_FILE_ALREADY_EXISTS_1 % new_name)
                 # copy <old_name> to <new_name> with slot substitutions
                 config.pki_log.info(log.PKIHELPER_COPY_WITH_SLOT_SUBSTITUTION_2,
                                     old_name, new_name,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 FILE = open(new_name, "w")
                 for line in fileinput.FileInput(old_name):
                     for slot in slots:
@@ -1749,7 +1749,7 @@ class File:
                             config.pki_log.debug(
                                 log.PKIHELPER_SLOT_SUBSTITUTION_2,
                                 slots[slot], master[slot],
-                                extra = config.PKI_INDENTATION_LEVEL_3)
+                                extra=config.PKI_INDENTATION_LEVEL_3)
                             line = line.replace(slots[slot], master[slot])
                     FILE.write(line)
                 FILE.close()
@@ -1760,12 +1760,12 @@ class File:
                 # chmod <perms> <new_name>
                 config.pki_log.debug(log.PKIHELPER_CHMOD_2,
                                      perms, new_name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(new_name, perms)
                 # chown <uid>:<gid> <new_name>
                 config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                      uid, gid, new_name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(new_name, uid, gid)
                 # Store record in installation manifest
                 record = manifest.record()
@@ -1780,26 +1780,26 @@ class File:
                 manifest.database.append(record)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except shutil.Error as exc:
             config.pki_log.error(log.PKI_SHUTIL_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def generate_noise_file(name, bytes, uid = None, gid = None,
-            perms = config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
-            acls = None, critical_failure = True):
+    def generate_noise_file(name, bytes, uid=None, gid=None,
+            perms=config.PKI_DEPLOYMENT_DEFAULT_FILE_PERMISSIONS,
+            acls=None, critical_failure=True):
         try:
             if not os.path.exists(name):
                 # generating noise file called <name> and
                 # filling it with <bytes> random bytes
                 config.pki_log.info(log.PKIHELPER_NOISE_FILE_2, name, bytes,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 open(name, "w").close()
                 FILE = open(name, "w")
                 noise = ''.join(random.choice(string.ascii_letters + \
@@ -1808,7 +1808,7 @@ class File:
                 FILE.close()
                 # chmod <perms> <name>
                 config.pki_log.debug(log.PKIHELPER_CHMOD_2, perms, name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chmod(name, perms)
                 # chown <uid>:<gid> <name>
                 if uid == None:
@@ -1817,7 +1817,7 @@ class File:
                     gid = Identity.get_gid()
                 config.pki_log.debug(log.PKIHELPER_CHOWN_3,
                                      uid, gid, name,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.chown(name, uid, gid)
                 # Store record in installation manifest
                 record = manifest.record()
@@ -1833,7 +1833,7 @@ class File:
             elif not os.path.isfile(name):
                 config.pki_log.error(
                     log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_FILE_ALREADY_EXISTS_NOT_A_FILE_1 % name)
         except OSError as exc:
@@ -1841,7 +1841,7 @@ class File:
                 pass
             else:
                 config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise
         return
@@ -1849,21 +1849,21 @@ class File:
 
 class Symlink:
     """PKI Deployment Symbolic Link Class"""
-    
+
     @staticmethod
-    def create(name, link, uid = None, gid = None,
-               acls = None, allow_dangling_symlink = False, critical_failure = True):
+    def create(name, link, uid=None, gid=None,
+               acls=None, allow_dangling_symlink=False, critical_failure=True):
         try:
             if not os.path.exists(link):
                 if not os.path.exists(name):
                     config.pki_log.warning(
                         log.PKIHELPER_DANGLING_SYMLINK_2, link, name,
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     if not allow_dangling_symlink:
                         raise Exception("Dangling symlink " + link + " not allowed")
                 # ln -s <name> <link>
                 config.pki_log.info(log.PKIHELPER_LINK_S_2, name, link,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 os.symlink(name, link)
                 # REMINDER:  Due to POSIX compliance, 'lchmod' is NEVER
                 #            implemented on Linux systems since 'chmod'
@@ -1875,7 +1875,7 @@ class Symlink:
                     gid = Identity.get_gid()
                 config.pki_log.debug(log.PKIHELPER_CHOWN_H_3,
                                      uid, gid, link,
-                                     extra = config.PKI_INDENTATION_LEVEL_3)
+                                     extra=config.PKI_INDENTATION_LEVEL_3)
                 os.lchown(link, uid, gid)
                 # Store record in installation manifest
                 record = manifest.record()
@@ -1892,7 +1892,7 @@ class Symlink:
             elif not os.path.islink(link):
                 config.pki_log.error(
                     log.PKI_SYMLINK_ALREADY_EXISTS_NOT_A_SYMLINK_1, link,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_SYMLINK_ALREADY_EXISTS_NOT_A_SYMLINK_1 % link)
         except OSError as exc:
@@ -1900,26 +1900,26 @@ class Symlink:
                 pass
             else:
                 config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise
         return
- 
+
     @staticmethod
-    def modify(link, uid = None, gid = None,
-               acls = None, silent = False, critical_failure = True):
+    def modify(link, uid=None, gid=None,
+               acls=None, silent=False, critical_failure=True):
         try:
             if os.path.exists(link):
                 if not os.path.islink(link):
                     config.pki_log.error(
                         log.PKI_SYMLINK_ALREADY_EXISTS_NOT_A_SYMLINK_1,
-                        link, extra = config.PKI_INDENTATION_LEVEL_2)
+                        link, extra=config.PKI_INDENTATION_LEVEL_2)
                     if critical_failure == True:
                         raise Exception(log.PKI_SYMLINK_ALREADY_EXISTS_NOT_A_SYMLINK_1 % link)
                 # Always re-process each link whether it needs it or not
                 if not silent:
                     config.pki_log.info(log.PKIHELPER_MODIFY_SYMLINK_1, link,
-                                        extra = config.PKI_INDENTATION_LEVEL_2)
+                                        extra=config.PKI_INDENTATION_LEVEL_2)
                 # REMINDER:  Due to POSIX compliance, 'lchmod' is NEVER
                 #            implemented on Linux systems since 'chmod'
                 #            CANNOT be run directly against symbolic links!
@@ -1931,7 +1931,7 @@ class Symlink:
                 if not silent:
                     config.pki_log.debug(log.PKIHELPER_CHOWN_H_3,
                                          uid, gid, link,
-                                         extra = config.PKI_INDENTATION_LEVEL_3)
+                                         extra=config.PKI_INDENTATION_LEVEL_3)
                 os.lchown(link, uid, gid)
                 # Store record in installation manifest
                 if not silent:
@@ -1949,32 +1949,32 @@ class Symlink:
             else:
                 config.pki_log.error(
                     log.PKI_SYMLINK_MISSING_OR_NOT_A_SYMLINK_1, link,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_SYMLINK_MISSING_OR_NOT_A_SYMLINK_1 % link)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def delete(link, critical_failure = True):
+    def delete(link, critical_failure=True):
         try:
             if not os.path.exists(link) or not os.path.islink(link):
                 # Simply issue a warning and continue
                 config.pki_log.warning(
                     log.PKI_SYMLINK_MISSING_OR_NOT_A_SYMLINK_1, link,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
             else:
                 # rm -f <link>
                 config.pki_log.info(log.PKIHELPER_RM_F_1, link,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 os.remove(link)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -1988,31 +1988,31 @@ class Symlink:
                 return True
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             raise
 
 class War:
     """PKI Deployment War File Class"""
-    
+
     @staticmethod
-    def explode(name, path, critical_failure = True):
+    def explode(name, path, critical_failure=True):
         try:
             if os.path.exists(name) and os.path.isfile(name):
                 if not zipfile.is_zipfile(name):
                     config.pki_log.error(
                         log.PKI_FILE_NOT_A_WAR_FILE_1,
-                        name, extra = config.PKI_INDENTATION_LEVEL_2)
+                        name, extra=config.PKI_INDENTATION_LEVEL_2)
                     if critical_failure == True:
                         raise Exception(log.PKI_FILE_NOT_A_WAR_FILE_1 % name)
                 if not os.path.exists(path) or not os.path.isdir(path):
                     config.pki_log.error(
                         log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1,
-                        path, extra = config.PKI_INDENTATION_LEVEL_2)
+                        path, extra=config.PKI_INDENTATION_LEVEL_2)
                     if critical_failure == True:
                         raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, path)
                 # jar -xf <name> -C <path>
                 config.pki_log.info(log.PKIHELPER_JAR_XF_C_2, name, path,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 # Open war file
                 war = zipfile.ZipFile(name, 'r')
                 # Extract contents of war file to path
@@ -2020,22 +2020,22 @@ class War:
             else:
                 config.pki_log.error(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1, name)
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except zipfile.BadZipfile as exc:
             config.pki_log.error(log.PKI_BADZIPFILE_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except zipfile.LargeZipFile as exc:
             config.pki_log.error(log.PKI_LARGEZIPFILE_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -2045,14 +2045,14 @@ class Password:
     """PKI Deployment Password Class"""
 
     @staticmethod
-    def create_password_conf(path, pin, pin_sans_token = False,
-                             overwrite_flag = False, critical_failure = True):
+    def create_password_conf(path, pin, pin_sans_token=False,
+                             overwrite_flag=False, critical_failure=True):
         try:
             if os.path.exists(path):
                 if overwrite_flag:
                     config.pki_log.info(
                         log.PKIHELPER_PASSWORD_CONF_1, path,
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     # overwrite the existing 'password.conf' file
                     with open(path, "wt") as fd:
                         if pin_sans_token == True:
@@ -2066,7 +2066,7 @@ class Password:
                                      "=" + str(pin))
             else:
                 config.pki_log.info(log.PKIHELPER_PASSWORD_CONF_1, path,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 # create a new 'password.conf' file
                 with open(path, "wt") as fd:
                     if pin_sans_token == True:
@@ -2080,38 +2080,38 @@ class Password:
                                  "=" + str(pin))
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def create_client_pkcs12_password_conf(path, overwrite_flag = False,
-                                           critical_failure = True):
+    def create_client_pkcs12_password_conf(path, overwrite_flag=False,
+                                           critical_failure=True):
         try:
             if os.path.exists(path):
                 if overwrite_flag:
                     config.pki_log.info(
                         log.PKIHELPER_PASSWORD_CONF_1, path,
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     # overwrite the existing 'pkcs12_password.conf' file
                     with open(path, "wt") as fd:
                         fd.write(master['pki_client_pkcs12_password'])
             else:
                 config.pki_log.info(log.PKIHELPER_PASSWORD_CONF_1, path,
-                                    extra = config.PKI_INDENTATION_LEVEL_2)
+                                    extra=config.PKI_INDENTATION_LEVEL_2)
                 # create a new 'pkcs12_password.conf' file
                 with open(path, "wt") as fd:
                     fd.write(master['pki_client_pkcs12_password'])
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def get_password(path, token_name, critical_failure = True):
+    def get_password(path, token_name, critical_failure=True):
         if os.path.exists(path) and os.path.isfile(path) and\
            os.access(path, os.R_OK):
             tokens = PKIConfigParser.read_simple_configuration_file(path)
@@ -2126,7 +2126,7 @@ class Password:
             # TODO prompt for this password
             config.pki_log.error(log.PKIHELPER_PASSWORD_NOT_FOUND_1,
                                  token_name,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise Exception(log.PKIHELPER_PASSWORD_NOT_FOUND_1 % token_name)
             else:
@@ -2136,12 +2136,12 @@ class Password:
 
 class Certutil:
     """PKI Deployment NSS 'certutil' Class"""
-    
+
     @staticmethod
     def create_security_databases(path, pki_cert_database,
                                   pki_key_database, pki_secmod_database,
-                                  password_file = None, prefix = None,
-                                  critical_failure = True):
+                                  password_file=None, prefix=None,
+                                  critical_failure=True):
         try:
             # Compose this "certutil" command
             command = "certutil" + " " + "-N"
@@ -2151,7 +2151,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_PATH,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_PATH)
             if password_file != None:
                 command = command + " " + "-f" + " " + password_file
@@ -2160,7 +2160,7 @@ class Certutil:
             if not os.path.exists(path):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, path,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % path)
             if os.path.exists(pki_cert_database) or\
                os.path.exists(pki_key_database) or\
@@ -2171,7 +2171,7 @@ class Certutil:
                     pki_cert_database,
                     pki_key_database,
                     pki_secmod_database,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
             else:
                 if password_file != None:
                     if not os.path.exists(password_file) or\
@@ -2179,23 +2179,23 @@ class Certutil:
                         config.pki_log.error(
                             log.PKI_FILE_MISSING_OR_NOT_A_FILE_1,
                             password_file,
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % password_file)
                 # Display this "certutil" command
                 config.pki_log.info(
                     log.PKIHELPER_CREATE_SECURITY_DATABASES_1,
                     command,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 # Execute this "certutil" command
-                subprocess.call(command, shell = True)
+                subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -2203,8 +2203,8 @@ class Certutil:
     @staticmethod
     def verify_certificate_exists(path, pki_cert_database,
                                   pki_key_database, pki_secmod_database,
-                                  token, nickname, password_file = None,
-                                  silent = True, critical_failure = True):
+                                  token, nickname, password_file=None,
+                                  silent=True, critical_failure=True):
         rv = 0
         try:
             # Compose this "certutil" command
@@ -2215,7 +2215,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_PATH,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_PATH)
             #   Specify the 'token'
             if token:
@@ -2223,7 +2223,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_TOKEN,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_TOKEN)
             #   Specify the nickname of this self-signed certificate
             if nickname:
@@ -2231,7 +2231,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_NICKNAME,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_NICKNAME)
             #   OPTIONALLY specify a password file
             if password_file != None:
@@ -2242,7 +2242,7 @@ class Certutil:
             if not os.path.exists(path):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, path,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % path)
             if not os.path.exists(pki_cert_database) or\
                not os.path.exists(pki_key_database) or\
@@ -2253,7 +2253,7 @@ class Certutil:
                     pki_cert_database,
                     pki_key_database,
                     pki_secmod_database,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_SECURITY_DATABASES_DO_NOT_EXIST_3 % (pki_cert_database,
                                                                              pki_key_database, pki_secmod_database))
             if password_file != None:
@@ -2262,15 +2262,15 @@ class Certutil:
                     config.pki_log.error(
                         log.PKI_FILE_MISSING_OR_NOT_A_FILE_1,
                         password_file,
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % password_file)
             # Execute this "certutil" command
-            subprocess.check_call(command, shell = True)
+            subprocess.check_call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             return False
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return True
@@ -2282,8 +2282,8 @@ class Certutil:
                                          subject, serial_number,
                                          validity_period, issuer_name,
                                          trustargs, noise_file,
-                                         password_file = None,
-                                         critical_failure = True):
+                                         password_file=None,
+                                         critical_failure=True):
         try:
             # Compose this "certutil" command
             command = "certutil" + " " + "-S"
@@ -2293,7 +2293,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_PATH,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_PATH)
             #   Specify the 'token'
             if token:
@@ -2301,7 +2301,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_TOKEN,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_TOKEN)
             #   Specify the nickname of this self-signed certificate
             if nickname:
@@ -2309,7 +2309,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_NICKNAME,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_NICKNAME)
             #   Specify the subject name (RFC1485)
             if subject:
@@ -2317,7 +2317,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_SUBJECT,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_SUBJECT)
             #   Specify the serial number
             if serial_number != None:
@@ -2325,7 +2325,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_SERIAL_NUMBER,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_SERIAL_NUMBER)
             #   Specify the months valid
             if validity_period != None:
@@ -2333,7 +2333,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_VALIDITY_PERIOD,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_VALIDITY_PERIOD)
             #   Specify the nickname of the issuer certificate
             if issuer_name:
@@ -2342,7 +2342,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_ISSUER_NAME,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_ISSUER_NAME)
             #   Specify the certificate trust attributes
             if trustargs:
@@ -2350,7 +2350,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_TRUSTARGS,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_TRUSTARGS)
             #   Specify a noise file to be used for key generation
             if noise_file:
@@ -2358,7 +2358,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_NOISE_FILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_NOISE_FILE)
             #   OPTIONALLY specify a password file
             if password_file != None:
@@ -2370,11 +2370,11 @@ class Certutil:
             # Display this "certutil" command
             config.pki_log.info(
                 log.PKIHELPER_CERTUTIL_SELF_SIGNED_CERTIFICATE_1, command,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if not os.path.exists(path):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1, path,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % path)
             if not os.path.exists(pki_cert_database) or\
                not os.path.exists(pki_key_database) or\
@@ -2385,14 +2385,14 @@ class Certutil:
                     pki_cert_database,
                     pki_key_database,
                     pki_secmod_database,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_SECURITY_DATABASES_DO_NOT_EXIST_3 % (pki_cert_database,
                                                                              pki_key_database, pki_secmod_database))
             if not os.path.exists(noise_file):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1,
                     noise_file,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % noise_file)
             if password_file != None:
                 if not os.path.exists(password_file) or\
@@ -2400,25 +2400,25 @@ class Certutil:
                     config.pki_log.error(
                         log.PKI_FILE_MISSING_OR_NOT_A_FILE_1,
                         password_file,
-                        extra = config.PKI_INDENTATION_LEVEL_2)
+                        extra=config.PKI_INDENTATION_LEVEL_2)
                     raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % password_file)
             # Execute this "certutil" command
-            subprocess.call(command, shell = True)
+            subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
     def import_cert(nickname, trust, input_file, password_file,
-                    path = None, token = None, critical_failure = True):
+                    path=None, token=None, critical_failure=True):
         try:
             command = ["certutil", "-A"]
             if path:
@@ -2432,7 +2432,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_NICKNAME,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_NICKNAME)
 
             if trust:
@@ -2440,7 +2440,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_TRUSTARGS,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_TRUSTARGS)
 
             if input_file:
@@ -2448,7 +2448,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_INPUT_FILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_INPUT_FILE)
 
             if password_file:
@@ -2456,20 +2456,20 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_PASSWORD_FILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_PASSWORD_FILE)
 
             config.pki_log.info(command,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             subprocess.call(command)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -2477,9 +2477,9 @@ class Certutil:
     @staticmethod
     def generate_certificate_request(subject, key_size,
                                      password_file, noise_file,
-                                     output_file = None, path = None,
-                                     ascii_format = None, token = None,
-                                     critical_failure = True):
+                                     output_file=None, path=None,
+                                     ascii_format=None, token=None,
+                                     critical_failure=True):
         try:
             command = ["certutil", "-R"]
             if path:
@@ -2495,7 +2495,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_SUBJECT,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_SUBJECT)
 
             if key_size:
@@ -2506,7 +2506,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_NOISE_FILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_NOISE_FILE)
 
             if password_file:
@@ -2514,7 +2514,7 @@ class Certutil:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_CERTUTIL_MISSING_PASSWORD_FILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_CERTUTIL_MISSING_PASSWORD_FILE)
 
             if output_file:
@@ -2527,41 +2527,41 @@ class Certutil:
             # Display this "certutil" command
             config.pki_log.info(
                 log.PKIHELPER_CERTUTIL_GENERATE_CSR_1, command,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if not os.path.exists(noise_file):
                 config.pki_log.error(
                     log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1,
                     noise_file,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % noise_file)
             if not os.path.exists(password_file) or\
                not os.path.isfile(password_file):
                 config.pki_log.error(
                     log.PKI_FILE_MISSING_OR_NOT_A_FILE_1,
                     password_file,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % password_file)
             # Execute this "certutil" command
             with open(os.devnull, "w") as fnull:
-                subprocess.call(command, stdout = fnull, stderr = fnull)
+                subprocess.call(command, stdout=fnull, stderr=fnull)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
 class PK12util:
     """pk12util class"""
-    
+
     @staticmethod
     def create_file(out_file, nickname, out_pwfile,
-                    db_pwfile, path = None, critical_failure = True):
+                    db_pwfile, path=None, critical_failure=True):
         try:
             command = ["pk12util"]
             if path:
@@ -2571,51 +2571,51 @@ class PK12util:
             else:
                 config.pki_log.error(
                     log.PKIHELPER_PK12UTIL_MISSING_OUTFILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_PK12UTIL_MISSING_OUTFILE)
             if nickname:
                 command.extend(["-n", nickname])
             else:
                 config.pki_log.error(
                     log.PKIHELPER_PK12UTIL_MISSING_NICKNAME,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_PK12UTIL_MISSING_NICKNAME)
             if out_pwfile:
                 command.extend(["-w", out_pwfile])
             else:
                 config.pki_log.error(
                     log.PKIHELPER_PK12UTIL_MISSING_PWFILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_PK12UTIL_MISSING_PWFILE)
             if db_pwfile:
                 command.extend(["-k", db_pwfile])
             else:
                 config.pki_log.error(
                     log.PKIHELPER_PK12UTIL_MISSING_DBPWFILE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 raise Exception(log.PKIHELPER_PK12UTIL_MISSING_DBPWFILE)
 
             config.pki_log.info(command,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
             with open(os.devnull, "w") as fnull:
-                subprocess.call(command, stdout = fnull, stderr = fnull)
+                subprocess.call(command, stdout=fnull, stderr=fnull)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
 class KRA_connector:
     """KRA Connector Class"""
-    
+
     @staticmethod
-    def deregister(critical_failure = False):
+    def deregister(critical_failure=False):
         try:
             # this is applicable to KRAs only
             if master['pki_subsystem_type'] != "kra":
@@ -2623,7 +2623,7 @@ class KRA_connector:
 
             config.pki_log.info(
                 log.PKIHELPER_KRACONNECTOR_UPDATE_CONTACT,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
 
             cs_cfg = PKIConfigParser.read_simple_configuration_file(
                          master['pki_target_cs_cfg'])
@@ -2635,10 +2635,10 @@ class KRA_connector:
                caport is None:
                 config.pki_log.warning(
                     log.PKIHELPER_KRACONNECTOR_UPDATE_FAILURE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 config.pki_log.error(
                     log.PKIHELPER_UNDEFINED_CA_HOST_PORT,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKIHELPER_UNDEFINED_CA_HOST_PORT)
                 else:
@@ -2649,10 +2649,10 @@ class KRA_connector:
             if subsystemnick is None:
                 config.pki_log.warning(
                     log.PKIHELPER_KRACONNECTOR_UPDATE_FAILURE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 config.pki_log.error(
                     log.PKIHELPER_UNDEFINED_SUBSYSTEM_NICKNAME,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKIHELPER_UNDEFINED_SUBSYSTEM_NICKNAME)
                 else:
@@ -2672,11 +2672,11 @@ class KRA_connector:
             if token_pwd is None or token_pwd == '':
                 config.pki_log.warning(
                     log.PKIHELPER_KRACONNECTOR_UPDATE_FAILURE,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 config.pki_log.error(
                     log.PKIHELPER_UNDEFINED_TOKEN_PASSWD_1,
                     token_name,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKIHELPER_UNDEFINED_TOKEN_PASSWD_1 % token_name)
                 else:
@@ -2690,16 +2690,16 @@ class KRA_connector:
                 log.PKIHELPER_KRACONNECTOR_UPDATE_FAILURE_2,
                 str(krahost),
                 str(kraport),
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
     def execute_using_pki(caport, cahost, subsystemnick,
-      token_pwd, krahost, kraport, critical_failure = False):
+      token_pwd, krahost, kraport, critical_failure=False):
         command = "/bin/pki -p '{}' -h '{}' -n '{}' -P https -d '{}' -c '{}' "\
                   "kraconnector-del {} {}".format(
                       caport, cahost, subsystemnick,
@@ -2707,8 +2707,8 @@ class KRA_connector:
                       token_pwd, krahost, kraport)
 
         output = subprocess.check_output(command,
-                                         stderr = subprocess.STDOUT,
-                                         shell = True)
+                                         stderr=subprocess.STDOUT,
+                                         shell=True)
 
         error = re.findall("ClientResponseFailure:(.*?)", output)
         if error:
@@ -2716,9 +2716,9 @@ class KRA_connector:
                 log.PKIHELPER_KRACONNECTOR_UPDATE_FAILURE_2,
                 str(krahost),
                 str(kraport),
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, output,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
         if critical_failure == True:
             raise Exception(log.PKI_SUBPROCESS_ERROR_1 % output)
 
@@ -2743,14 +2743,14 @@ class KRA_connector:
         # Note that sslget will return non-zero value for HTTP code != 200
         # and this will raise an exception
         output = subprocess.check_output(command,
-                                         stderr = subprocess.STDOUT,
-                                         shell = True)
+                                         stderr=subprocess.STDOUT,
+                                         shell=True)
 
 class Security_domain:
     """PKI Deployment Security Domain Class"""
-    
+
     @staticmethod
-    def deregister(install_token, critical_failure = False):
+    def deregister(install_token, critical_failure=False):
         # process this PKI subsystem instance's 'CS.cfg'
         cs_cfg = PKIConfigParser.read_simple_configuration_file(
             master['pki_target_cs_cfg'])
@@ -2780,10 +2780,10 @@ class Security_domain:
                 log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2,
                 typeval,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(
                 log.PKIHELPER_SECURITY_DOMAIN_UNDEFINED,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise Exception(log.PKIHELPER_SECURITY_DOMAIN_UNDEFINED)
             else:
@@ -2791,7 +2791,7 @@ class Security_domain:
 
         config.pki_log.info(log.PKIHELPER_SECURITY_DOMAIN_CONTACT_1,
                             secname,
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
         listval = typeval.lower() + "List"
         urlheader = "https://{}:{}".format(sechost, seceeport)
         urlagentheader = "https://{}:{}".format(sechost, secagentport)
@@ -2819,13 +2819,13 @@ class Security_domain:
                              params, adminUpdateURL,
                              sechost, secadminport)
                 output = subprocess.check_output(command,
-                                             stderr = subprocess.STDOUT,
-                                             shell = True)
+                                             stderr=subprocess.STDOUT,
+                                             shell=True)
             except subprocess.CalledProcessError as exc:
                 config.pki_log.warning(
                     log.PKIHELPER_SECURITY_DOMAIN_UNREACHABLE_1,
                     secname,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 output = Security_domain.update_domain_using_agent_port(typeval,
                     secname, params, updateURL, sechost, secagentport,
                     critical_failure)
@@ -2842,14 +2842,14 @@ class Security_domain:
 
         config.pki_log.debug(log.PKIHELPER_SSLGET_OUTPUT_1,
                              output,
-                             extra = config.PKI_INDENTATION_LEVEL_2)
+                             extra=config.PKI_INDENTATION_LEVEL_2)
         # Search the output for Status
         status = re.findall("\<Status\>(.*?)\<\/Status\>", output)
         if not status:
             config.pki_log.warning(
                 log.PKIHELPER_SECURITY_DOMAIN_UNREACHABLE_1,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise Exception(log.PKIHELPER_SECURITY_DOMAIN_UNREACHABLE_1 % secname)
         elif status[0] != "0":
@@ -2860,13 +2860,13 @@ class Security_domain:
                 log.PKIHELPER_SECURITY_DOMAIN_UNREGISTERED_2,
                 typeval,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(
                 log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_3,
                 typeval,
                 secname,
                 error,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise Exception(log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_3
                                 %
@@ -2876,11 +2876,11 @@ class Security_domain:
                 log.PKIHELPER_SECURITY_DOMAIN_UPDATE_SUCCESS_2,
                 typeval,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
 
     @staticmethod
     def update_domain_using_agent_port(typeval, secname, params,
-        updateURL, sechost, secagentport, critical_failure = False):
+        updateURL, sechost, secagentport, critical_failure=False):
         token_pwd = None
         cs_cfg = PKIConfigParser.read_simple_configuration_file(
             master['pki_target_cs_cfg'])
@@ -2892,10 +2892,10 @@ class Security_domain:
                 log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2,
                 typeval,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(
                 log.PKIHELPER_UNDEFINED_SUBSYSTEM_NICKNAME,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise Exception(log.PKIHELPER_UNDEFINED_SUBSYSTEM_NICKNAME)
             else:
@@ -2917,7 +2917,7 @@ class Security_domain:
                 log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2,
                 typeval,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise Exception(log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2
                                 %
@@ -2933,28 +2933,28 @@ class Security_domain:
                       sechost, secagentport)
         try:
             output = subprocess.check_output(command,
-                                             stderr = subprocess.STDOUT,
-                                             shell = True)
+                                             stderr=subprocess.STDOUT,
+                                             shell=True)
             return output
         except subprocess.CalledProcessError as exc:
             config.pki_log.warning(
                 log.PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2,
                 typeval,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.warning(
                 log.PKIHELPER_SECURITY_DOMAIN_UNREACHABLE_1,
                 secname,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
 
         return None
 
     @staticmethod
-    def get_installation_token(secuser, secpass, critical_failure = True):
+    def get_installation_token(secuser, secpass, critical_failure=True):
         token = None
 
         if not secuser or not secpass:
@@ -2979,8 +2979,8 @@ class Security_domain:
                       machinename, cstype)
         try:
             output = subprocess.check_output(command,
-                                         stderr = subprocess.STDOUT,
-                                         shell = True)
+                                         stderr=subprocess.STDOUT,
+                                         shell=True)
 
             token_list = re.findall("Install token: \"(.*)\"", output)
             if not token_list:
@@ -2988,9 +2988,9 @@ class Security_domain:
                     log.PKIHELPER_SECURITY_DOMAIN_GET_TOKEN_FAILURE_2,
                     str(sechost),
                     str(secadminport),
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, output,
-                    extra = config.PKI_INDENTATION_LEVEL_2)
+                    extra=config.PKI_INDENTATION_LEVEL_2)
                 if critical_failure == True:
                     raise Exception(log.PKIHELPER_SECURITY_DOMAIN_GET_TOKEN_FAILURE_2
                                     %
@@ -3003,18 +3003,18 @@ class Security_domain:
                 log.PKIHELPER_SECURITY_DOMAIN_GET_TOKEN_FAILURE_2,
                 str(sechost),
                 str(secadminport),
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return None
 
 class Systemd:
     """PKI Deployment 'systemd' Execution Management Class"""
-    
+
     @staticmethod
-    def start(critical_failure = True):
+    def start(critical_failure=True):
         try:
             # Compose this "systemd" execution management command
             if master['pki_subsystem'] in config.PKI_APACHE_SUBSYSTEMS:
@@ -3030,18 +3030,18 @@ class Systemd:
             # Display this "systemd" execution managment command
             config.pki_log.info(
                 log.PKIHELPER_SYSTEMD_COMMAND_1, command,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             # Execute this "systemd" execution management command
-            subprocess.call(command, shell = True)
+            subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def stop(critical_failure = True):
+    def stop(critical_failure=True):
         try:
             # Compose this "systemd" execution management command
             if master['pki_subsystem'] in config.PKI_APACHE_SUBSYSTEMS:
@@ -3057,18 +3057,18 @@ class Systemd:
             # Display this "systemd" execution managment command
             config.pki_log.info(
                 log.PKIHELPER_SYSTEMD_COMMAND_1, command,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             # Execute this "systemd" execution management command
-            subprocess.call(command, shell = True)
+            subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
 
     @staticmethod
-    def restart(critical_failure = True):
+    def restart(critical_failure=True):
         try:
             # Compose this "systemd" execution management command
             if master['pki_subsystem'] in config.PKI_APACHE_SUBSYSTEMS:
@@ -3084,12 +3084,12 @@ class Systemd:
             # Display this "systemd" execution managment command
             config.pki_log.info(
                 log.PKIHELPER_SYSTEMD_COMMAND_1, command,
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             # Execute this "systemd" execution management command
-            subprocess.call(command, shell = True)
+            subprocess.call(command, shell=True)
         except subprocess.CalledProcessError as exc:
             config.pki_log.error(log.PKI_SUBPROCESS_ERROR_1, exc,
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             if critical_failure == True:
                 raise
         return
@@ -3100,13 +3100,13 @@ class Config_client:
     @staticmethod
     def configure_pki_data(data):
         config.pki_log.info(log.PKI_CONFIG_CONFIGURING_PKI_DATA,
-                             extra = config.PKI_INDENTATION_LEVEL_2)
+                             extra=config.PKI_INDENTATION_LEVEL_2)
 
         connection = pki.client.PKIConnection(
-            protocol = 'https',
-            hostname = master['pki_hostname'],
-            port = master['pki_https_port'],
-            subsystem = master['pki_subsystem_type'])
+            protocol='https',
+            hostname=master['pki_hostname'],
+            port=master['pki_https_port'],
+            subsystem=master['pki_subsystem_type'])
 
         try:
             client = pki.system.SystemConfigClient(connection)
@@ -3114,7 +3114,7 @@ class Config_client:
 
             config.pki_log.debug(log.PKI_CONFIG_RESPONSE_STATUS + \
                                    " " + str(response['status']),
-                                 extra = config.PKI_INDENTATION_LEVEL_2)
+                                 extra=config.PKI_INDENTATION_LEVEL_2)
             certs = response['systemCerts']
             if not isinstance(certs, types.ListType):
                 certs = [certs]
@@ -3126,12 +3126,12 @@ class Config_client:
                     if cdata['tag'].lower() == "signing":
                         config.pki_log.info(log.PKI_CONFIG_CDATA_REQUEST + \
                             " " + cdata['request'],
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
 
                         # Save 'External CA Signing Certificate' CSR (Step 1)
                         config.pki_log.info(log.PKI_CONFIG_EXTERNAL_CSR_SAVE + \
                             " '" + master['pki_external_csr_path'] + "'",
-                            extra = config.PKI_INDENTATION_LEVEL_2)
+                            extra=config.PKI_INDENTATION_LEVEL_2)
                         Directory.create(
                             os.path.dirname(master['pki_external_csr_path']))
                         with open(master['pki_external_csr_path'], "w") as f:
@@ -3140,13 +3140,13 @@ class Config_client:
                 else:
                     config.pki_log.debug(log.PKI_CONFIG_CDATA_TAG + \
                                            " " + cdata['tag'],
-                                         extra = config.PKI_INDENTATION_LEVEL_2)
+                                         extra=config.PKI_INDENTATION_LEVEL_2)
                     config.pki_log.debug(log.PKI_CONFIG_CDATA_CERT + \
                                            " " + cdata['cert'],
-                                         extra = config.PKI_INDENTATION_LEVEL_2)
+                                         extra=config.PKI_INDENTATION_LEVEL_2)
                     config.pki_log.debug(log.PKI_CONFIG_CDATA_REQUEST + \
                                            " " + cdata['request'],
-                                         extra = config.PKI_INDENTATION_LEVEL_2)
+                                         extra=config.PKI_INDENTATION_LEVEL_2)
 
             # Cloned PKI subsystems do not return an Admin Certificate
             if not config.str2bool(master['pki_clone']) and \
@@ -3161,11 +3161,11 @@ class Config_client:
                     message = root.findall('.//Message')[0].text
                     if message is not None:
                         config.pki_log.error(log.PKI_CONFIG_JAVA_CONFIGURATION_EXCEPTION + " " + message,
-                                         extra = config.PKI_INDENTATION_LEVEL_2)
+                                         extra=config.PKI_INDENTATION_LEVEL_2)
                         raise
             config.pki_log.error(
                 log.PKI_CONFIG_JAVA_CONFIGURATION_EXCEPTION + " " + str(e),
-                extra = config.PKI_INDENTATION_LEVEL_2)
+                extra=config.PKI_INDENTATION_LEVEL_2)
             raise
         return
 
@@ -3173,21 +3173,21 @@ class Config_client:
     def process_admin_cert(admin_cert):
         config.pki_log.debug(log.PKI_CONFIG_RESPONSE_ADMIN_CERT + \
                              " " + admin_cert,
-                             extra = config.PKI_INDENTATION_LEVEL_2)
+                             extra=config.PKI_INDENTATION_LEVEL_2)
 
         # Store the Administration Certificate in a file
         admin_cert_file = master['pki_client_admin_cert']
         admin_cert_bin_file = admin_cert_file + ".der"
         config.pki_log.debug(log.PKI_CONFIG_ADMIN_CERT_SAVE + \
                                " '" + admin_cert_file + "'",
-                             extra = config.PKI_INDENTATION_LEVEL_2)
+                             extra=config.PKI_INDENTATION_LEVEL_2)
         with open(admin_cert_file, "w") as f:
             f.write(admin_cert)
 
         # convert the cert file to binary
         command = ["AtoB", admin_cert_file, admin_cert_bin_file]
         config.pki_log.info(command,
-            extra = config.PKI_INDENTATION_LEVEL_2)
+            extra=config.PKI_INDENTATION_LEVEL_2)
         subprocess.call(command)
 
         os.chmod(admin_cert_file,
@@ -3226,7 +3226,7 @@ class Config_client:
     @staticmethod
     def construct_pki_configuration_data():
         config.pki_log.info(log.PKI_CONFIG_CONSTRUCTING_PKI_DATA,
-                             extra = config.PKI_INDENTATION_LEVEL_2)
+                             extra=config.PKI_INDENTATION_LEVEL_2)
 
         data = pki.system.ConfigurationRequest()
 
@@ -3275,7 +3275,7 @@ class Config_client:
         Config_client.set_system_certs(data)
 
         return data
-    
+
     @staticmethod
     def set_system_certs(data):
         systemCerts = []
@@ -3427,7 +3427,7 @@ class Config_client:
             data.backupPassword = master['pki_backup_password']
         else:
             data.backupKeys = "false"
- 
+
     @staticmethod
     def set_admin_parameters(data):
         data.adminEmail = master['pki_admin_email']
@@ -3469,7 +3469,7 @@ class Config_client:
                 # convert output to ascii
                 command = ["BtoA", output_file, output_file + ".asc"]
                 config.pki_log.info(command,
-                                     extra = config.PKI_INDENTATION_LEVEL_2)
+                                     extra=config.PKI_INDENTATION_LEVEL_2)
                 subprocess.call(command)
 
                 with open(output_file + ".asc") as f:
diff --git a/base/server/src/engine/pkilogging.py b/base/server/src/engine/pkilogging.py
index 31961614551c4ab25da1d12d4761f93df43ad476..b73650ee5434d9afa6b86e4a9e25f3c94adffd0a 100644
--- a/base/server/src/engine/pkilogging.py
+++ b/base/server/src/engine/pkilogging.py
@@ -57,8 +57,8 @@ def enable_pki_logger(log_dir, log_name, log_level, console_log_level, name):
     # Configure console handler
     console = logging.StreamHandler()
     console.setLevel(console_log_level)
-    console_format = logging.Formatter('%(name)-12s: ' +\
-                                       '%(levelname)-8s ' +\
+    console_format = logging.Formatter('%(name)-12s: ' + \
+                                       '%(levelname)-8s ' + \
                                        '%(indent)s%(message)s')
     console.setFormatter(console_format)
     logger.addHandler(console)
@@ -66,8 +66,8 @@ def enable_pki_logger(log_dir, log_name, log_level, console_log_level, name):
     # Configure file handler
     file = logging.FileHandler(log_dir + "/" + log_name, 'w')
     file.setLevel(log_level)
-    file_format = logging.Formatter('%(asctime)s %(name)-12s: ' +\
-                                    '%(levelname)-8s ' +\
+    file_format = logging.Formatter('%(asctime)s %(name)-12s: ' + \
+                                    '%(levelname)-8s ' + \
                                     '%(indent)s%(message)s',
                                     '%Y-%m-%d %H:%M:%S')
     file.setFormatter(file_format)
diff --git a/base/server/src/engine/pkimanifest.py b/base/server/src/engine/pkimanifest.py
index f53b76492cbc8aa50033d8307f192e545c900dba..1300414f87ae3e8d0f6b0d5169b1c9307e5c5d3d 100644
--- a/base/server/src/engine/pkimanifest.py
+++ b/base/server/src/engine/pkimanifest.py
@@ -38,13 +38,13 @@ RECORD_TYPE_SYMLINK = "symlink"
 
 # PKI Deployment Manifest Record Class
 class record(object):
-    __slots__= "name",\
-               "type",\
-               "user",\
-               "group",\
-               "uid",\
-               "gid",\
-               "permissions",\
+    __slots__ = "name", \
+               "type", \
+               "user", \
+               "group", \
+               "uid", \
+               "gid", \
+               "permissions", \
                "acls",
 
     def items(self):
diff --git a/base/server/src/engine/pkimessages.py b/base/server/src/engine/pkimessages.py
index 6f390fe9e9bf6cdbaa02d1c68addd312b5c715c3..3e8330b139dc62c864773ad0962b1d769a3f9db2 100644
--- a/base/server/src/engine/pkimessages.py
+++ b/base/server/src/engine/pkimessages.py
@@ -20,23 +20,23 @@
 #
 
 # PKI Deployment Engine Messages
-PKI_DICTIONARY_DEFAULT ="\n"\
+PKI_DICTIONARY_DEFAULT = "\n"\
 "=====================================================\n"\
 "    DISPLAY CONTENTS OF PKI DEFAULT DICTIONARY\n"\
 "====================================================="
-PKI_DICTIONARY_MASTER="\n"\
+PKI_DICTIONARY_MASTER = "\n"\
 "=====================================================\n"\
 "    DISPLAY CONTENTS OF PKI MASTER DICTIONARY\n"\
 "====================================================="
-PKI_DICTIONARY_SLOTS="\n"\
+PKI_DICTIONARY_SLOTS = "\n"\
 "=====================================================\n"\
 "    DISPLAY CONTENTS OF PKI SLOTS DICTIONARY\n"\
 "====================================================="
-PKI_DICTIONARY_SUBSYSTEM="\n"\
+PKI_DICTIONARY_SUBSYSTEM = "\n"\
 "=====================================================\n"\
 "    DISPLAY CONTENTS OF PKI SUBSYSTEM DICTIONARY\n"\
 "====================================================="
-PKI_DICTIONARY_WEB_SERVER="\n"\
+PKI_DICTIONARY_WEB_SERVER = "\n"\
 "=====================================================\n"\
 "    DISPLAY CONTENTS OF PKI WEB SERVER DICTIONARY\n"\
 "====================================================="
@@ -44,7 +44,7 @@ PKI_DICTIONARY_WEB_SERVER="\n"\
 
 
 # PKI Deployment Log Messages
-PKI_VERBOSITY=\
+PKI_VERBOSITY = \
 "VERBOSITY FLAGS    CONSOLE MESSAGE LEVEL       LOG MESSAGE LEVEL\n"\
 "=======================================================================\n"\
 "  NONE             error|warning               error|warning|info|debug\n"\
@@ -109,7 +109,7 @@ PKIDESTROY_BEGIN_MESSAGE_2 = "BEGIN destroying subsystem '%s' of "\
                              "instance '%s' . . ."
 PKIDESTROY_END_MESSAGE_2 = "END destroying subsystem '%s' of "\
                            "instance '%s'"
-PKIDESTROY_EPILOG =\
+PKIDESTROY_EPILOG = \
 "REMINDER:\n\n"\
 "    The default PKI instance path will be calculated and placed in front\n"\
 "    of the mandatory '-i <instance>' parameter, and the values that reside\n"\
@@ -118,13 +118,13 @@ PKIDESTROY_EPILOG =\
 "    utilized by 'pkidestroy' to remove this instance.\n\n"\
 "    Finally, if an optional '-p <prefix>' is defined, this value WILL be\n"\
 "    prepended to the default PKI instance path which is placed in front\n"\
-"    of the specified '-i <instance>' parameter.\n\n" +\
+"    of the specified '-i <instance>' parameter.\n\n" + \
 PKI_VERBOSITY
 PKISPAWN_BEGIN_MESSAGE_2 = "BEGIN spawning subsystem '%s' of "\
                            "instance '%s' . . ."
 PKISPAWN_END_MESSAGE_2 = "END spawning subsystem '%s' of "\
                          "instance '%s'"
-PKISPAWN_EPILOG =\
+PKISPAWN_EPILOG = \
 "REMINDER:\n\n"\
 "    If two or more Apache or Tomcat PKI 'instances' are specified via\n"\
 "    separate configuration files, remember that the following parameters\n"\
@@ -133,7 +133,7 @@ PKISPAWN_EPILOG =\
 "        Tomcat:  'pki_instance_name', 'pki_http_port', 'pki_https_port',\n"\
 "                 'pki_ajp_port', and 'pki_tomcat_server_port'\n\n"\
 "    Finally, if an optional '-p <prefix>' is defined, this value WILL NOT\n"\
-"    be prepended in front of the mandatory '-f <configuration_file>'.\n\n" +\
+"    be prepended in front of the mandatory '-f <configuration_file>'.\n\n" + \
 PKI_VERBOSITY
 
 
@@ -193,7 +193,7 @@ PKIHELPER_IS_A_DIRECTORY_1 = "'%s' is a directory"
 PKIHELPER_IS_A_FILE_1 = "'%s' is a file"
 PKIHELPER_IS_A_SYMLINK_1 = "'%s' is a symlink"
 PKIHELPER_JAR_XF_C_2 = "jar -xf %s -C %s"
-PKIHELPER_KRACONNECTOR_UPDATE_CONTACT =\
+PKIHELPER_KRACONNECTOR_UPDATE_CONTACT = \
     "contacting the CA to update the KRA connector"
 PKIHELPER_KRACONNECTOR_UPDATE_FAILURE = "Failed to update KRA connector on CA"
 PKIHELPER_KRACONNECTOR_UPDATE_FAILURE_2 = "Failed to update KRA connector for %s:%s"
@@ -238,24 +238,24 @@ PKIHELPER_REMOVE_FILTER_SECTION_1 = "removing filter section from '%s'"
 PKIHELPER_RM_F_1 = "rm -f %s"
 PKIHELPER_RM_RF_1 = "rm -rf %s"
 PKIHELPER_RMDIR_1 = "rmdir %s"
-PKIHELPER_SECURITY_DOMAIN_CONTACT_1 =\
+PKIHELPER_SECURITY_DOMAIN_CONTACT_1 = \
     "contacting the security domain master to update security domain '%s'"
-PKIHELPER_SECURITY_DOMAIN_GET_TOKEN_FAILURE_2 =\
+PKIHELPER_SECURITY_DOMAIN_GET_TOKEN_FAILURE_2 = \
     "Failed to get installation token from security domain '%s:%s'"
-PKIHELPER_SECURITY_DOMAIN_UNDEFINED =\
+PKIHELPER_SECURITY_DOMAIN_UNDEFINED = \
     "No security domain defined.\n"\
     "If this is an unconfigured instance, then that is OK.\n"\
     "Otherwise, manually delete the entry from the security domain master."
-PKIHELPER_SECURITY_DOMAIN_UNREACHABLE_1 =\
+PKIHELPER_SECURITY_DOMAIN_UNREACHABLE_1 = \
     "security domain '%s' may be offline or unreachable!"
-PKIHELPER_SECURITY_DOMAIN_UNREGISTERED_2 =\
+PKIHELPER_SECURITY_DOMAIN_UNREGISTERED_2 = \
     "this '%s' entry may not be registered with security domain '%s'!"
-PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2 =\
+PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_2 = \
     "this '%s' entry will NOT be deleted from security domain '%s'!"
-PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_3 =\
+PKIHELPER_SECURITY_DOMAIN_UPDATE_FAILURE_3 = \
     "updateDomainXML FAILED to delete this '%s' entry from "\
     "security domain '%s': '%s'"
-PKIHELPER_SECURITY_DOMAIN_UPDATE_SUCCESS_2 =\
+PKIHELPER_SECURITY_DOMAIN_UPDATE_SUCCESS_2 = \
     "updateDomainXML SUCCESSFULLY deleted this '%s' entry from "\
     "security domain '%s'"
 PKIHELPER_SELINUX_DISABLED = "Selinux is disabled.  Not checking port contexts"
@@ -274,10 +274,10 @@ PKIHELPER_TOMCAT_INSTANCES_2 = "PKI Tomcat registry '%s' contains '%d' "\
 PKIHELPER_TOUCH_1 = "touch %s"
 PKIHELPER_UID_2 = "UID of '%s' is %s"
 PKIHELPER_UNDEFINED_CA_HOST_PORT = "CA Host or Port is undefined"
-PKIHELPER_UNDEFINED_CLIENT_DATABASE_PASSWORD_2 =\
+PKIHELPER_UNDEFINED_CLIENT_DATABASE_PASSWORD_2 = \
     "Either a value for '%s' MUST be defined in '%s', or "\
     "the randomly generated client pin MUST be used"
-PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 =\
+PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 = \
     "A value for '%s' MUST be defined in '%s'"
 PKIHELPER_UNDEFINED_SUBSYSTEM_NICKNAME = "subsystem nickname not defined"
 PKIHELPER_UNDEFINED_TOKEN_PASSWD_1 = "Password for token '%s' not defined"
@@ -301,7 +301,7 @@ PKI_CONFIG_EXTERNAL_CA_LOAD = "loading external CA signing certificate "\
 PKI_CONFIG_EXTERNAL_CA_CHAIN_LOAD = "loading external CA signing certificate "\
                                     "chain from file:"
 PKI_CONFIG_EXTERNAL_CSR_SAVE = "saving CA Signing CSR to file:"
-PKI_CONFIG_JAVA_CONFIGURATION_EXCEPTION =\
+PKI_CONFIG_JAVA_CONFIGURATION_EXCEPTION = \
     "Exception from Java Configuration Servlet:"
 PKI_CONFIG_RESPONSE_ADMIN_CERT = "adminCert:"
 PKI_CONFIG_RESPONSE_STATUS = "status:"
diff --git a/base/server/src/engine/pkiparser.py b/base/server/src/engine/pkiparser.py
index e121c8625971499d039053276c9a340b6ef0650e..e6f8541fab0553cc410afdc00d74632d7dd204b3 100644
--- a/base/server/src/engine/pkiparser.py
+++ b/base/server/src/engine/pkiparser.py
@@ -48,7 +48,7 @@ import pki.system
 class PKIConfigParser:
 
     COMMENT_CHAR = '#'
-    OPTION_CHAR =  '='
+    OPTION_CHAR = '='
 
     def __init__(self, description, epilog):
         self.pki_config = None
@@ -125,8 +125,8 @@ class PKIConfigParser:
         if len(config.pki_root_prefix) > 0:
             if not os.path.exists(config.pki_root_prefix) or\
                  not os.path.isdir(config.pki_root_prefix):
-                print "ERROR:  " +\
-                      log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 %\
+                print "ERROR:  " + \
+                      log.PKI_DIRECTORY_MISSING_OR_NOT_A_DIRECTORY_1 % \
                       config.pki_root_prefix
                 print
                 self.arg_parser.print_help()
@@ -135,8 +135,8 @@ class PKIConfigParser:
         # always default that configuration file exists
         if not os.path.exists(config.default_deployment_cfg) or\
             not os.path.isfile(config.default_deployment_cfg):
-            print "ERROR:  " +\
-                  log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 %\
+            print "ERROR:  " + \
+                  log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % \
                   config.default_deployment_cfg
             print
             self.arg_parser.print_help()
@@ -146,8 +146,8 @@ class PKIConfigParser:
             # verify user configuration file exists
             if not os.path.exists(config.user_deployment_cfg) or\
                 not os.path.isfile(config.user_deployment_cfg):
-                print "ERROR:  " +\
-                      log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 %\
+                print "ERROR:  " + \
+                      log.PKI_FILE_MISSING_OR_NOT_A_FILE_1 % \
                       config.user_deployment_cfg
                 print
                 parser.arg_parser.print_help()
@@ -401,7 +401,7 @@ class PKIConfigParser:
             info = sd.getSecurityDomainInfo()
         except requests.exceptions.HTTPError as e:
             config.pki_log.info(
-                "unable to access security domain through REST interface.  " +\
+                "unable to access security domain through REST interface.  " + \
                 "Trying old interface. " + str(e),
                  extra=config.PKI_INDENTATION_LEVEL_2)
             info = sd.getOldSecurityDomainInfo()
@@ -420,7 +420,7 @@ class PKIConfigParser:
             code = e.response.status_code
             if code == 404 or code == 501:
                 config.pki_log.warning(
-                    "unable to validate security domain user/password " +\
+                    "unable to validate security domain user/password " + \
                     "through REST interface. Interface not available",
                      extra=config.PKI_INDENTATION_LEVEL_2)
             else:
@@ -430,25 +430,25 @@ class PKIConfigParser:
         "Create a single master PKI dictionary from the sectional dictionaries"
         try:
             # 'pkispawn'/'pkidestroy' name/value pairs
-            config.pki_master_dict['pki_deployment_executable'] =\
+            config.pki_master_dict['pki_deployment_executable'] = \
                 config.pki_deployment_executable
             config.pki_master_dict['pki_install_time'] = config.pki_install_time
             config.pki_master_dict['pki_timestamp'] = config.pki_timestamp
-            config.pki_master_dict['pki_certificate_timestamp'] =\
+            config.pki_master_dict['pki_certificate_timestamp'] = \
                 config.pki_certificate_timestamp
             config.pki_master_dict['pki_architecture'] = config.pki_architecture
             config.pki_master_dict['pki_default_deployment_cfg'] = config.default_deployment_cfg
             config.pki_master_dict['pki_user_deployment_cfg'] = config.user_deployment_cfg
-            config.pki_master_dict['pki_deployed_instance_name'] =\
+            config.pki_master_dict['pki_deployed_instance_name'] = \
                 config.pki_deployed_instance_name
             # Generate random 'pin's for use as security database passwords
             # and add these to the "sensitive" key value pairs read in from
             # the configuration file
-            pin_low  = 100000000000
+            pin_low = 100000000000
             pin_high = 999999999999
-            config.pki_master_dict['pki_pin'] =\
+            config.pki_master_dict['pki_pin'] = \
                 random.randint(pin_low, pin_high)
-            config.pki_master_dict['pki_client_pin'] =\
+            config.pki_master_dict['pki_client_pin'] = \
                 random.randint(pin_low, pin_high)
 
             self.flatten_master_dict()
@@ -456,11 +456,11 @@ class PKIConfigParser:
             pkilogging.sensitive_parameters = config.pki_master_dict['sensitive_parameters'].split()
 
             # PKI Target (slot substitution) name/value pairs
-            config.pki_master_dict['pki_target_cs_cfg'] =\
+            config.pki_master_dict['pki_target_cs_cfg'] = \
                 os.path.join(
                     config.pki_master_dict['pki_subsystem_configuration_path'],
                     "CS.cfg")
-            config.pki_master_dict['pki_target_registry'] =\
+            config.pki_master_dict['pki_target_registry'] = \
                 os.path.join(config.pki_master_dict['pki_instance_registry_path'],
                              config.pki_master_dict['pki_instance_name'])
             if config.pki_master_dict['pki_subsystem'] == "CA" and\
@@ -472,7 +472,7 @@ class PKIConfigParser:
                    os.path.isfile(config.pki_master_dict['pki_target_cs_cfg']):
                     cs_cfg = self.read_simple_configuration_file(
                                  config.pki_master_dict['pki_target_cs_cfg'])
-                    config.pki_master_dict['pki_one_time_pin'] =\
+                    config.pki_master_dict['pki_one_time_pin'] = \
                         cs_cfg.get('preop.pin')
                 else:
                     config.pki_log.error(log.PKI_FILE_MISSING_OR_NOT_A_FILE_1,
@@ -483,92 +483,92 @@ class PKIConfigParser:
                 # Generate a one-time pin to be used prior to configuration
                 # and add this to the "sensitive" key value pairs read in from
                 # the configuration file
-                config.pki_master_dict['pki_one_time_pin'] =\
+                config.pki_master_dict['pki_one_time_pin'] = \
                     ''.join(random.choice(string.ascii_letters + string.digits)\
                     for x in range(20))
             if config.pki_master_dict['pki_subsystem'] in\
                config.PKI_TOMCAT_SUBSYSTEMS:
-                config.pki_master_dict['pki_target_catalina_properties'] =\
+                config.pki_master_dict['pki_target_catalina_properties'] = \
                     os.path.join(
                         config.pki_master_dict['pki_instance_configuration_path'],
                         "catalina.properties")
-                config.pki_master_dict['pki_target_servercertnick_conf'] =\
+                config.pki_master_dict['pki_target_servercertnick_conf'] = \
                     os.path.join(
                         config.pki_master_dict['pki_instance_configuration_path'],
                         "serverCertNick.conf")
-                config.pki_master_dict['pki_target_server_xml'] =\
+                config.pki_master_dict['pki_target_server_xml'] = \
                     os.path.join(
                         config.pki_master_dict['pki_instance_configuration_path'],
                         "server.xml")
-                config.pki_master_dict['pki_target_context_xml'] =\
+                config.pki_master_dict['pki_target_context_xml'] = \
                     os.path.join(
                         config.pki_master_dict['pki_instance_configuration_path'],
                         "context.xml")
-                config.pki_master_dict['pki_target_tomcat_conf_instance_id'] =\
-                    config.pki_master_dict['pki_root_prefix'] +\
-                    "/etc/sysconfig/" +\
+                config.pki_master_dict['pki_target_tomcat_conf_instance_id'] = \
+                    config.pki_master_dict['pki_root_prefix'] + \
+                    "/etc/sysconfig/" + \
                     config.pki_master_dict['pki_instance_name']
-                config.pki_master_dict['pki_target_tomcat_conf'] =\
+                config.pki_master_dict['pki_target_tomcat_conf'] = \
                     os.path.join(
                         config.pki_master_dict['pki_instance_configuration_path'],
                         "tomcat.conf")
                 # in-place slot substitution name/value pairs
-                config.pki_master_dict['pki_target_velocity_properties'] =\
+                config.pki_master_dict['pki_target_velocity_properties'] = \
                     os.path.join(
                         config.pki_master_dict['pki_tomcat_webapps_subsystem_path'],
                         "WEB-INF",
                         "velocity.properties")
-                config.pki_master_dict['pki_target_subsystem_web_xml'] =\
+                config.pki_master_dict['pki_target_subsystem_web_xml'] = \
                     os.path.join(
                         config.pki_master_dict['pki_tomcat_webapps_subsystem_path'],
                         "WEB-INF",
                         "web.xml")
-                config.pki_master_dict['pki_target_subsystem_web_xml_orig'] =\
+                config.pki_master_dict['pki_target_subsystem_web_xml_orig'] = \
                     os.path.join(
                         config.pki_master_dict['pki_tomcat_webapps_subsystem_path'],
                         "WEB-INF",
                         "web.xml.orig")
                 # subystem-specific slot substitution name/value pairs
                 if config.pki_master_dict['pki_subsystem'] == "CA":
-                    config.pki_master_dict['pki_target_flatfile_txt'] =\
+                    config.pki_master_dict['pki_target_flatfile_txt'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "flatfile.txt")
-                    config.pki_master_dict['pki_target_proxy_conf'] =\
+                    config.pki_master_dict['pki_target_proxy_conf'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "proxy.conf")
-                    config.pki_master_dict['pki_target_registry_cfg'] =\
+                    config.pki_master_dict['pki_target_registry_cfg'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "registry.cfg")
                     # '*.profile'
-                    config.pki_master_dict['pki_target_admincert_profile'] =\
+                    config.pki_master_dict['pki_target_admincert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "adminCert.profile")
                     config.pki_master_dict['pki_target_caauditsigningcert_profile']\
-                        = os.path.join(config.pki_master_dict\
+ = os.path.join(config.pki_master_dict\
                                        ['pki_subsystem_configuration_path'],
                                        "caAuditSigningCert.profile")
-                    config.pki_master_dict['pki_target_cacert_profile'] =\
+                    config.pki_master_dict['pki_target_cacert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "caCert.profile")
-                    config.pki_master_dict['pki_target_caocspcert_profile'] =\
+                    config.pki_master_dict['pki_target_caocspcert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "caOCSPCert.profile")
-                    config.pki_master_dict['pki_target_servercert_profile'] =\
+                    config.pki_master_dict['pki_target_servercert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "serverCert.profile")
-                    config.pki_master_dict['pki_target_subsystemcert_profile'] =\
+                    config.pki_master_dict['pki_target_subsystemcert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "subsystemCert.profile")
                     # in-place slot substitution name/value pairs
-                    config.pki_master_dict['pki_target_profileselect_template'] =\
+                    config.pki_master_dict['pki_target_profileselect_template'] = \
                         os.path.join(
                             config.pki_master_dict\
                             ['pki_tomcat_webapps_subsystem_path'],
@@ -577,30 +577,30 @@ class PKIConfigParser:
                             "ProfileSelect.template")
                 elif config.pki_master_dict['pki_subsystem'] == "KRA":
                     # '*.profile'
-                    config.pki_master_dict['pki_target_servercert_profile'] =\
+                    config.pki_master_dict['pki_target_servercert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "serverCert.profile")
-                    config.pki_master_dict['pki_target_storagecert_profile'] =\
+                    config.pki_master_dict['pki_target_storagecert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "storageCert.profile")
-                    config.pki_master_dict['pki_target_subsystemcert_profile'] =\
+                    config.pki_master_dict['pki_target_subsystemcert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "subsystemCert.profile")
-                    config.pki_master_dict['pki_target_transportcert_profile'] =\
+                    config.pki_master_dict['pki_target_transportcert_profile'] = \
                         os.path.join(config.pki_master_dict\
                                      ['pki_subsystem_configuration_path'],
                                      "transportCert.profile")
             # Slot assignment name/value pairs
             #     NOTE:  Master key == Slots key; Master value ==> Slots value
-            config.pki_master_dict['PKI_INSTANCE_ID_SLOT'] =\
+            config.pki_master_dict['PKI_INSTANCE_ID_SLOT'] = \
                 config.pki_master_dict['pki_instance_name']
-            config.pki_master_dict['PKI_INSTANCE_INITSCRIPT_SLOT'] =\
+            config.pki_master_dict['PKI_INSTANCE_INITSCRIPT_SLOT'] = \
                 os.path.join(config.pki_master_dict['pki_instance_path'],
                              config.pki_master_dict['pki_instance_name'])
-            config.pki_master_dict['PKI_REGISTRY_FILE_SLOT'] =\
+            config.pki_master_dict['PKI_REGISTRY_FILE_SLOT'] = \
                 os.path.join(config.pki_master_dict['pki_subsystem_registry_path'],
                              config.pki_master_dict['pki_instance_name'])
             if config.pki_master_dict['pki_subsystem'] in\
@@ -616,10 +616,10 @@ class PKIConfigParser:
                 config.pki_master_dict['NON_CLIENTAUTH_SECURE_PORT_SLOT'] = None
                 config.pki_master_dict['NSS_CONF_SLOT'] = None
                 config.pki_master_dict['OBJ_EXT_SLOT'] = None
-                config.pki_master_dict['PKI_LOCKDIR_SLOT'] =\
+                config.pki_master_dict['PKI_LOCKDIR_SLOT'] = \
                     os.path.join("/var/lock/pki",
                                  "apache")
-                config.pki_master_dict['PKI_PIDDIR_SLOT'] =\
+                config.pki_master_dict['PKI_PIDDIR_SLOT'] = \
                     os.path.join("/var/run/pki",
                                  "apache")
                 config.pki_master_dict['PKI_WEB_SERVER_TYPE_SLOT'] = "apache"
@@ -636,240 +636,240 @@ class PKIConfigParser:
                 config.pki_master_dict['TPS_DIR_SLOT'] = None
             elif config.pki_master_dict['pki_subsystem'] in\
                  config.PKI_TOMCAT_SUBSYSTEMS:
-                config.pki_master_dict['INSTALL_TIME_SLOT'] =\
+                config.pki_master_dict['INSTALL_TIME_SLOT'] = \
                     config.pki_master_dict['pki_install_time']
-                config.pki_master_dict['PKI_ADMIN_SECURE_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_ADMIN_SECURE_PORT_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
                 config.pki_master_dict\
-                ['PKI_ADMIN_SECURE_PORT_CONNECTOR_NAME_SLOT'] =\
+                ['PKI_ADMIN_SECURE_PORT_CONNECTOR_NAME_SLOT'] = \
                     "Unused"
                 config.pki_master_dict\
-                ['PKI_ADMIN_SECURE_PORT_SERVER_COMMENT_SLOT'] =\
+                ['PKI_ADMIN_SECURE_PORT_SERVER_COMMENT_SLOT'] = \
                     ""
-                config.pki_master_dict['PKI_AGENT_CLIENTAUTH_SLOT'] =\
+                config.pki_master_dict['PKI_AGENT_CLIENTAUTH_SLOT'] = \
                     "want"
-                config.pki_master_dict['PKI_AGENT_SECURE_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_AGENT_SECURE_PORT_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
-                config.pki_master_dict['PKI_AJP_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_AJP_PORT_SLOT'] = \
                     config.pki_master_dict['pki_ajp_port']
-                config.pki_master_dict['PKI_AJP_REDIRECT_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_AJP_REDIRECT_PORT_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
-                config.pki_master_dict['PKI_CERT_DB_PASSWORD_SLOT'] =\
+                config.pki_master_dict['PKI_CERT_DB_PASSWORD_SLOT'] = \
                     config.pki_master_dict['pki_pin']
-                config.pki_master_dict['PKI_CFG_PATH_NAME_SLOT'] =\
+                config.pki_master_dict['PKI_CFG_PATH_NAME_SLOT'] = \
                     config.pki_master_dict['pki_target_cs_cfg']
                 config.pki_master_dict\
-                ['PKI_CLOSE_SEPARATE_PORTS_SERVER_COMMENT_SLOT'] =\
+                ['PKI_CLOSE_SEPARATE_PORTS_SERVER_COMMENT_SLOT'] = \
                     "-->"
                 config.pki_master_dict\
-                ['PKI_CLOSE_SEPARATE_PORTS_WEB_COMMENT_SLOT'] =\
+                ['PKI_CLOSE_SEPARATE_PORTS_WEB_COMMENT_SLOT'] = \
                     "-->"
-                config.pki_master_dict['PKI_EE_SECURE_CLIENT_AUTH_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_EE_SECURE_CLIENT_AUTH_PORT_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
                 config.pki_master_dict\
-                ['PKI_EE_SECURE_CLIENT_AUTH_PORT_CONNECTOR_NAME_SLOT'] =\
+                ['PKI_EE_SECURE_CLIENT_AUTH_PORT_CONNECTOR_NAME_SLOT'] = \
                     "Unused"
                 config.pki_master_dict\
-                ['PKI_EE_SECURE_CLIENT_AUTH_PORT_SERVER_COMMENT_SLOT'] =\
+                ['PKI_EE_SECURE_CLIENT_AUTH_PORT_SERVER_COMMENT_SLOT'] = \
                     ""
-                config.pki_master_dict['PKI_EE_SECURE_CLIENT_AUTH_PORT_UI_SLOT'] =\
+                config.pki_master_dict['PKI_EE_SECURE_CLIENT_AUTH_PORT_UI_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
-                config.pki_master_dict['PKI_EE_SECURE_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_EE_SECURE_PORT_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
-                config.pki_master_dict['PKI_EE_SECURE_PORT_CONNECTOR_NAME_SLOT'] =\
+                config.pki_master_dict['PKI_EE_SECURE_PORT_CONNECTOR_NAME_SLOT'] = \
                     "Unused"
-                config.pki_master_dict['PKI_EE_SECURE_PORT_SERVER_COMMENT_SLOT'] =\
+                config.pki_master_dict['PKI_EE_SECURE_PORT_SERVER_COMMENT_SLOT'] = \
                     ""
-                config.pki_master_dict['PKI_GROUP_SLOT'] =\
+                config.pki_master_dict['PKI_GROUP_SLOT'] = \
                     config.pki_master_dict['pki_group']
-                config.pki_master_dict['PKI_INSTANCE_PATH_SLOT'] =\
+                config.pki_master_dict['PKI_INSTANCE_PATH_SLOT'] = \
                     config.pki_master_dict['pki_instance_path']
-                config.pki_master_dict['PKI_INSTANCE_ROOT_SLOT'] =\
+                config.pki_master_dict['PKI_INSTANCE_ROOT_SLOT'] = \
                     config.pki_master_dict['pki_path']
-                config.pki_master_dict['PKI_LOCKDIR_SLOT'] =\
+                config.pki_master_dict['PKI_LOCKDIR_SLOT'] = \
                     os.path.join("/var/lock/pki",
                                  "tomcat")
-                config.pki_master_dict['PKI_MACHINE_NAME_SLOT'] =\
+                config.pki_master_dict['PKI_MACHINE_NAME_SLOT'] = \
                     config.pki_master_dict['pki_hostname']
                 config.pki_master_dict\
-                ['PKI_OPEN_SEPARATE_PORTS_SERVER_COMMENT_SLOT'] =\
+                ['PKI_OPEN_SEPARATE_PORTS_SERVER_COMMENT_SLOT'] = \
                     "<!--"
                 config.pki_master_dict\
-                ['PKI_OPEN_SEPARATE_PORTS_WEB_COMMENT_SLOT'] =\
+                ['PKI_OPEN_SEPARATE_PORTS_WEB_COMMENT_SLOT'] = \
                     "<!--"
-                config.pki_master_dict['PKI_PIDDIR_SLOT'] =\
+                config.pki_master_dict['PKI_PIDDIR_SLOT'] = \
                     os.path.join("/var/run/pki",
                                  "tomcat")
                 if config.str2bool(config.pki_master_dict['pki_enable_proxy']):
-                    config.pki_master_dict['PKI_CLOSE_AJP_PORT_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_CLOSE_AJP_PORT_COMMENT_SLOT'] = \
                         ""
-                    config.pki_master_dict['PKI_CLOSE_ENABLE_PROXY_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_CLOSE_ENABLE_PROXY_COMMENT_SLOT'] = \
                         ""
-                    config.pki_master_dict['PKI_PROXY_SECURE_PORT_SLOT'] =\
+                    config.pki_master_dict['PKI_PROXY_SECURE_PORT_SLOT'] = \
                         config.pki_master_dict['pki_proxy_https_port']
-                    config.pki_master_dict['PKI_PROXY_UNSECURE_PORT_SLOT'] =\
+                    config.pki_master_dict['PKI_PROXY_UNSECURE_PORT_SLOT'] = \
                         config.pki_master_dict['pki_proxy_http_port']
-                    config.pki_master_dict['PKI_OPEN_AJP_PORT_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_OPEN_AJP_PORT_COMMENT_SLOT'] = \
                         ""
-                    config.pki_master_dict['PKI_OPEN_ENABLE_PROXY_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_OPEN_ENABLE_PROXY_COMMENT_SLOT'] = \
                         ""
                 else:
-                    config.pki_master_dict['PKI_CLOSE_AJP_PORT_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_CLOSE_AJP_PORT_COMMENT_SLOT'] = \
                         "-->"
-                    config.pki_master_dict['PKI_CLOSE_ENABLE_PROXY_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_CLOSE_ENABLE_PROXY_COMMENT_SLOT'] = \
                         "-->"
                     config.pki_master_dict['PKI_PROXY_SECURE_PORT_SLOT'] = ""
                     config.pki_master_dict['PKI_PROXY_UNSECURE_PORT_SLOT'] = ""
-                    config.pki_master_dict['PKI_OPEN_AJP_PORT_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_OPEN_AJP_PORT_COMMENT_SLOT'] = \
                         "<!--"
-                    config.pki_master_dict['PKI_OPEN_ENABLE_PROXY_COMMENT_SLOT'] =\
+                    config.pki_master_dict['PKI_OPEN_ENABLE_PROXY_COMMENT_SLOT'] = \
                         "<!--"
-                config.pki_master_dict['PKI_TMPDIR_SLOT'] =\
+                config.pki_master_dict['PKI_TMPDIR_SLOT'] = \
                     config.pki_master_dict['pki_tomcat_tmpdir_path']
-                config.pki_master_dict['PKI_RESTEASY_LIB_SLOT'] =\
+                config.pki_master_dict['PKI_RESTEASY_LIB_SLOT'] = \
                     config.pki_master_dict['resteasy_lib']
-                config.pki_master_dict['PKI_RANDOM_NUMBER_SLOT'] =\
+                config.pki_master_dict['PKI_RANDOM_NUMBER_SLOT'] = \
                     config.pki_master_dict['pki_one_time_pin']
-                config.pki_master_dict['PKI_SECURE_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_SECURE_PORT_SLOT'] = \
                     config.pki_master_dict['pki_https_port']
-                config.pki_master_dict['PKI_SECURE_PORT_CONNECTOR_NAME_SLOT'] =\
+                config.pki_master_dict['PKI_SECURE_PORT_CONNECTOR_NAME_SLOT'] = \
                     "Secure"
-                config.pki_master_dict['PKI_SECURE_PORT_SERVER_COMMENT_SLOT'] =\
-                    "<!-- " +\
-                    "Shared Ports:  Agent, EE, and Admin Secure Port Connector " +\
+                config.pki_master_dict['PKI_SECURE_PORT_SERVER_COMMENT_SLOT'] = \
+                    "<!-- " + \
+                    "Shared Ports:  Agent, EE, and Admin Secure Port Connector " + \
                     "-->"
-                config.pki_master_dict['PKI_SECURITY_MANAGER_SLOT'] =\
+                config.pki_master_dict['PKI_SECURITY_MANAGER_SLOT'] = \
                     config.pki_master_dict['pki_security_manager']
-                config.pki_master_dict['PKI_SERVER_XML_CONF_SLOT'] =\
+                config.pki_master_dict['PKI_SERVER_XML_CONF_SLOT'] = \
                     config.pki_master_dict['pki_target_server_xml']
-                config.pki_master_dict['PKI_SUBSYSTEM_DIR_SLOT'] =\
+                config.pki_master_dict['PKI_SUBSYSTEM_DIR_SLOT'] = \
                     config.pki_master_dict['pki_subsystem'].lower() + "/"
-                config.pki_master_dict['PKI_SUBSYSTEM_TYPE_SLOT'] =\
+                config.pki_master_dict['PKI_SUBSYSTEM_TYPE_SLOT'] = \
                     config.pki_master_dict['pki_subsystem'].lower()
-                config.pki_master_dict['PKI_SYSTEMD_SERVICENAME_SLOT'] =\
-                    "pki-tomcatd" + "@" +\
+                config.pki_master_dict['PKI_SYSTEMD_SERVICENAME_SLOT'] = \
+                    "pki-tomcatd" + "@" + \
                     config.pki_master_dict['pki_instance_name'] + ".service"
-                config.pki_master_dict['PKI_UNSECURE_PORT_SLOT'] =\
+                config.pki_master_dict['PKI_UNSECURE_PORT_SLOT'] = \
                     config.pki_master_dict['pki_http_port']
-                config.pki_master_dict['PKI_UNSECURE_PORT_CONNECTOR_NAME_SLOT'] =\
+                config.pki_master_dict['PKI_UNSECURE_PORT_CONNECTOR_NAME_SLOT'] = \
                     "Unsecure"
-                config.pki_master_dict['PKI_UNSECURE_PORT_SERVER_COMMENT_SLOT'] =\
+                config.pki_master_dict['PKI_UNSECURE_PORT_SERVER_COMMENT_SLOT'] = \
                     "<!-- Shared Ports:  Unsecure Port Connector -->"
-                config.pki_master_dict['PKI_USER_SLOT'] =\
+                config.pki_master_dict['PKI_USER_SLOT'] = \
                     config.pki_master_dict['pki_user']
-                config.pki_master_dict['PKI_WEB_SERVER_TYPE_SLOT'] =\
+                config.pki_master_dict['PKI_WEB_SERVER_TYPE_SLOT'] = \
                     "tomcat"
-                config.pki_master_dict['PKI_WEBAPPS_NAME_SLOT'] =\
+                config.pki_master_dict['PKI_WEBAPPS_NAME_SLOT'] = \
                     "webapps"
-                config.pki_master_dict['TOMCAT_CFG_SLOT'] =\
+                config.pki_master_dict['TOMCAT_CFG_SLOT'] = \
                     config.pki_master_dict['pki_target_tomcat_conf']
-                config.pki_master_dict['TOMCAT_INSTANCE_COMMON_LIB_SLOT'] =\
+                config.pki_master_dict['TOMCAT_INSTANCE_COMMON_LIB_SLOT'] = \
                     os.path.join(
                         config.pki_master_dict['pki_tomcat_common_lib_path'],
                         "*.jar")
-                config.pki_master_dict['TOMCAT_LOG_DIR_SLOT'] =\
+                config.pki_master_dict['TOMCAT_LOG_DIR_SLOT'] = \
                     config.pki_master_dict['pki_instance_log_path']
-                config.pki_master_dict['TOMCAT_PIDFILE_SLOT'] =\
+                config.pki_master_dict['TOMCAT_PIDFILE_SLOT'] = \
                     "/var/run/pki/tomcat/" + config.pki_master_dict['pki_instance_name'] + ".pid"
-                config.pki_master_dict['TOMCAT_SERVER_PORT_SLOT'] =\
+                config.pki_master_dict['TOMCAT_SERVER_PORT_SLOT'] = \
                     config.pki_master_dict['pki_tomcat_server_port']
-                config.pki_master_dict['TOMCAT_SSL2_CIPHERS_SLOT'] =\
-                    "-SSL2_RC4_128_WITH_MD5," +\
-                    "-SSL2_RC4_128_EXPORT40_WITH_MD5," +\
-                    "-SSL2_RC2_128_CBC_WITH_MD5," +\
-                    "-SSL2_RC2_128_CBC_EXPORT40_WITH_MD5," +\
-                    "-SSL2_DES_64_CBC_WITH_MD5," +\
+                config.pki_master_dict['TOMCAT_SSL2_CIPHERS_SLOT'] = \
+                    "-SSL2_RC4_128_WITH_MD5," + \
+                    "-SSL2_RC4_128_EXPORT40_WITH_MD5," + \
+                    "-SSL2_RC2_128_CBC_WITH_MD5," + \
+                    "-SSL2_RC2_128_CBC_EXPORT40_WITH_MD5," + \
+                    "-SSL2_DES_64_CBC_WITH_MD5," + \
                     "-SSL2_DES_192_EDE3_CBC_WITH_MD5"
-                config.pki_master_dict['TOMCAT_SSL3_CIPHERS_SLOT'] =\
-                    "-SSL3_FORTEZZA_DMS_WITH_NULL_SHA," +\
-                    "-SSL3_FORTEZZA_DMS_WITH_RC4_128_SHA," +\
-                    "+SSL3_RSA_WITH_RC4_128_SHA," +\
-                    "-SSL3_RSA_EXPORT_WITH_RC4_40_MD5," +\
-                    "+SSL3_RSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "+SSL3_RSA_WITH_DES_CBC_SHA," +\
-                    "-SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5," +\
-                    "-SSL3_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA," +\
-                    "-SSL_RSA_FIPS_WITH_DES_CBC_SHA," +\
-                    "+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA," +\
-                    "-SSL3_RSA_WITH_NULL_MD5," +\
-                    "-TLS_RSA_EXPORT1024_WITH_RC4_56_SHA," +\
-                    "-TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," +\
+                config.pki_master_dict['TOMCAT_SSL3_CIPHERS_SLOT'] = \
+                    "-SSL3_FORTEZZA_DMS_WITH_NULL_SHA," + \
+                    "-SSL3_FORTEZZA_DMS_WITH_RC4_128_SHA," + \
+                    "+SSL3_RSA_WITH_RC4_128_SHA," + \
+                    "-SSL3_RSA_EXPORT_WITH_RC4_40_MD5," + \
+                    "+SSL3_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "+SSL3_RSA_WITH_DES_CBC_SHA," + \
+                    "-SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5," + \
+                    "-SSL3_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA," + \
+                    "-SSL_RSA_FIPS_WITH_DES_CBC_SHA," + \
+                    "+SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA," + \
+                    "-SSL3_RSA_WITH_NULL_MD5," + \
+                    "-TLS_RSA_EXPORT1024_WITH_RC4_56_SHA," + \
+                    "-TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," + \
                     "+TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
-                config.pki_master_dict['TOMCAT_SSL_OPTIONS_SLOT'] =\
-                    "ssl2=true," +\
-                    "ssl3=true," +\
+                config.pki_master_dict['TOMCAT_SSL_OPTIONS_SLOT'] = \
+                    "ssl2=true," + \
+                    "ssl3=true," + \
                     "tls=true"
-                config.pki_master_dict['TOMCAT_TLS_CIPHERS_SLOT'] =\
-                    "-TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA," +\
-                    "-TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "+TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "+TLS_ECDH_RSA_WITH_AES_128_CBC_SHA," +\
-                    "+TLS_ECDH_RSA_WITH_AES_256_CBC_SHA," +\
-                    "-TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," +\
-                    "+TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA," +\
-                    "+TLS_RSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "+TLS_RSA_WITH_AES_128_CBC_SHA," +\
-                    "+TLS_RSA_WITH_AES_256_CBC_SHA," +\
-                    "+TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "+TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA," +\
-                    "-TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "-TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA," +\
-                    "-TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA," +\
-                    "+TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA," +\
-                    "+TLS_DHE_DSS_WITH_AES_128_CBC_SHA," +\
-                    "+TLS_DHE_DSS_WITH_AES_256_CBC_SHA," +\
-                    "+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA," +\
-                    "+TLS_DHE_RSA_WITH_AES_128_CBC_SHA," +\
+                config.pki_master_dict['TOMCAT_TLS_CIPHERS_SLOT'] = \
+                    "-TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "+TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "+TLS_ECDH_RSA_WITH_AES_128_CBC_SHA," + \
+                    "+TLS_ECDH_RSA_WITH_AES_256_CBC_SHA," + \
+                    "-TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," + \
+                    "+TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA," + \
+                    "+TLS_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "+TLS_RSA_WITH_AES_128_CBC_SHA," + \
+                    "+TLS_RSA_WITH_AES_256_CBC_SHA," + \
+                    "+TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "+TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "-TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA," + \
+                    "+TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA," + \
+                    "+TLS_DHE_DSS_WITH_AES_128_CBC_SHA," + \
+                    "+TLS_DHE_DSS_WITH_AES_256_CBC_SHA," + \
+                    "+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "+TLS_DHE_RSA_WITH_AES_128_CBC_SHA," + \
                     "+TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
                 if config.pki_master_dict['pki_subsystem'] == "CA":
-                    config.pki_master_dict['PKI_ENABLE_RANDOM_SERIAL_NUMBERS']=\
+                    config.pki_master_dict['PKI_ENABLE_RANDOM_SERIAL_NUMBERS'] = \
                         config.pki_master_dict\
                         ['pki_random_serial_numbers_enable'].lower()
             # Shared Apache/Tomcat NSS security database name/value pairs
-            config.pki_master_dict['pki_shared_pfile'] =\
+            config.pki_master_dict['pki_shared_pfile'] = \
                 os.path.join(
                     config.pki_master_dict['pki_instance_configuration_path'],
                     "pfile")
-            config.pki_master_dict['pki_shared_password_conf'] =\
+            config.pki_master_dict['pki_shared_password_conf'] = \
                 os.path.join(
                     config.pki_master_dict['pki_instance_configuration_path'],
                     "password.conf")
-            config.pki_master_dict['pki_cert_database'] =\
+            config.pki_master_dict['pki_cert_database'] = \
                 os.path.join(config.pki_master_dict['pki_database_path'],
                              "cert8.db")
-            config.pki_master_dict['pki_key_database'] =\
+            config.pki_master_dict['pki_key_database'] = \
                 os.path.join(config.pki_master_dict['pki_database_path'],
                              "key3.db")
-            config.pki_master_dict['pki_secmod_database'] =\
+            config.pki_master_dict['pki_secmod_database'] = \
                 os.path.join(config.pki_master_dict['pki_database_path'],
                              "secmod.db")
             config.pki_master_dict['pki_self_signed_token'] = "internal"
-            config.pki_master_dict['pki_self_signed_nickname'] =\
+            config.pki_master_dict['pki_self_signed_nickname'] = \
                 "Server-Cert cert-" + config.pki_master_dict['pki_instance_name']
-            config.pki_master_dict['pki_self_signed_subject'] =\
-                "cn=" + config.pki_master_dict['pki_hostname'] + "," +\
+            config.pki_master_dict['pki_self_signed_subject'] = \
+                "cn=" + config.pki_master_dict['pki_hostname'] + "," + \
                 "o=" + config.pki_master_dict['pki_certificate_timestamp']
             config.pki_master_dict['pki_self_signed_serial_number'] = 0
             config.pki_master_dict['pki_self_signed_validity_period'] = 12
-            config.pki_master_dict['pki_self_signed_issuer_name'] =\
-                "cn=" + config.pki_master_dict['pki_hostname'] + "," +\
+            config.pki_master_dict['pki_self_signed_issuer_name'] = \
+                "cn=" + config.pki_master_dict['pki_hostname'] + "," + \
                 "o=" + config.pki_master_dict['pki_certificate_timestamp']
             config.pki_master_dict['pki_self_signed_trustargs'] = "CTu,CTu,CTu"
-            config.pki_master_dict['pki_self_signed_noise_file'] =\
+            config.pki_master_dict['pki_self_signed_noise_file'] = \
                 os.path.join(
                     config.pki_master_dict['pki_subsystem_configuration_path'],
                     "noise")
             config.pki_master_dict['pki_self_signed_noise_bytes'] = 1024
             # Shared Apache/Tomcat NSS security database convenience symbolic links
             config.pki_master_dict\
-            ['pki_subsystem_configuration_password_conf_link'] =\
+            ['pki_subsystem_configuration_password_conf_link'] = \
                 os.path.join(
                     config.pki_master_dict['pki_subsystem_configuration_path'],
                     "password.conf")
 
             if not len(config.pki_master_dict['pki_client_database_password']):
                 # use randomly generated client 'pin'
-                config.pki_master_dict['pki_client_database_password'] =\
+                config.pki_master_dict['pki_client_database_password'] = \
                     str(config.pki_master_dict['pki_client_pin'])
 
             # Configuration scriptlet
@@ -912,13 +912,13 @@ class PKIConfigParser:
                 # use the CA admin uid if it's defined
                 if self.pki_config.has_option('CA', 'pki_admin_uid') and\
                     len(self.pki_config.get('CA', 'pki_admin_uid')) > 0:
-                    config.pki_master_dict['pki_security_domain_user'] =\
+                    config.pki_master_dict['pki_security_domain_user'] = \
                         self.pki_config.get('CA', 'pki_admin_uid')
 
                 # or use the Default admin uid if it's defined
                 elif self.pki_config.has_option('DEFAULT', 'pki_admin_uid') and\
                     len(self.pki_config.get('DEFAULT', 'pki_admin_uid')) > 0:
-                    config.pki_master_dict['pki_security_domain_user'] =\
+                    config.pki_master_dict['pki_security_domain_user'] = \
                         self.pki_config.get('DEFAULT', 'pki_admin_uid')
 
                 # otherwise use the default CA admin uid
@@ -932,9 +932,9 @@ class PKIConfigParser:
                 # CA Clone, KRA Clone, OCSP Clone, TKS Clone, or
                 # Subordinate CA
                 config.pki_master_dict['pki_security_domain_type'] = "existing"
-                config.pki_master_dict['pki_security_domain_uri'] =\
-                    "https" + "://" +\
-                    config.pki_master_dict['pki_security_domain_hostname'] + ":" +\
+                config.pki_master_dict['pki_security_domain_uri'] = \
+                    "https" + "://" + \
+                    config.pki_master_dict['pki_security_domain_hostname'] + ":" + \
                     config.pki_master_dict['pki_security_domain_https_port']
 
             elif config.str2bool(config.pki_master_dict['pki_external']):
@@ -975,9 +975,9 @@ class PKIConfigParser:
             if config.str2bool(config.pki_master_dict['pki_backup_keys']):
                 # NOTE:  ALWAYS store the PKCS #12 backup keys file
                 #        in with the NSS "server" security databases
-                config.pki_master_dict['pki_backup_keys_p12'] =\
-                    config.pki_master_dict['pki_database_path'] + "/" +\
-                    config.pki_master_dict['pki_subsystem'].lower() + "_" +\
+                config.pki_master_dict['pki_backup_keys_p12'] = \
+                    config.pki_master_dict['pki_database_path'] + "/" + \
+                    config.pki_master_dict['pki_subsystem'].lower() + "_" + \
                     "backup" + "_" + "keys" + "." + "p12"
 
             config.pki_master_dict['pki_admin_profile_id'] = "caAdminCert"
@@ -997,23 +997,23 @@ class PKIConfigParser:
             config.pki_master_dict['pki_storage_tag'] = "storage"
 
             # Finalization name/value pairs
-            config.pki_master_dict['pki_default_deployment_cfg_replica'] =\
+            config.pki_master_dict['pki_default_deployment_cfg_replica'] = \
                 os.path.join(config.pki_master_dict['pki_subsystem_registry_path'],
                              config.DEFAULT_DEPLOYMENT_CONFIGURATION)
-            config.pki_master_dict['pki_user_deployment_cfg_replica'] =\
+            config.pki_master_dict['pki_user_deployment_cfg_replica'] = \
                 os.path.join(config.pki_master_dict['pki_subsystem_registry_path'],
                              config.USER_DEPLOYMENT_CONFIGURATION)
-            config.pki_master_dict['pki_user_deployment_cfg_spawn_archive'] =\
-                config.pki_master_dict['pki_subsystem_archive_log_path'] + "/" +\
-                "spawn" + "_" +\
-                config.USER_DEPLOYMENT_CONFIGURATION + "." +\
+            config.pki_master_dict['pki_user_deployment_cfg_spawn_archive'] = \
+                config.pki_master_dict['pki_subsystem_archive_log_path'] + "/" + \
+                "spawn" + "_" + \
+                config.USER_DEPLOYMENT_CONFIGURATION + "." + \
                 config.pki_master_dict['pki_timestamp']
-            config.pki_master_dict['pki_manifest'] =\
-                config.pki_master_dict['pki_subsystem_registry_path'] + "/" +\
+            config.pki_master_dict['pki_manifest'] = \
+                config.pki_master_dict['pki_subsystem_registry_path'] + "/" + \
                 "manifest"
-            config.pki_master_dict['pki_manifest_spawn_archive'] =\
-                config.pki_master_dict['pki_subsystem_archive_log_path'] + "/" +\
-                "spawn" + "_" + "manifest" + "." +\
+            config.pki_master_dict['pki_manifest_spawn_archive'] = \
+                config.pki_master_dict['pki_subsystem_archive_log_path'] + "/" + \
+                "spawn" + "_" + "manifest" + "." + \
                 config.pki_master_dict['pki_timestamp']
             # Construct the configuration URL containing the one-time pin
             # and add this to the "sensitive" key value pairs read in from
@@ -1023,7 +1023,7 @@ class PKIConfigParser:
             #        parameter that may be stored in a log file and displayed
             #        to the screen.
             #
-            config.pki_master_dict['pki_configuration_url'] =\
+            config.pki_master_dict['pki_configuration_url'] = \
                 "https://{}:{}/{}/{}?pin={}".format(
                     config.pki_master_dict['pki_hostname'],
                     config.pki_master_dict['pki_https_port'],
@@ -1033,17 +1033,17 @@ class PKIConfigParser:
             # Compose this "systemd" execution management command
             if config.pki_master_dict['pki_subsystem'] in\
                config.PKI_APACHE_SUBSYSTEMS:
-                config.pki_master_dict['pki_registry_initscript_command'] =\
-                    "systemctl" + " " +\
-                    "restart" + " " +\
-                    "pki-apached" + "@" +\
+                config.pki_master_dict['pki_registry_initscript_command'] = \
+                    "systemctl" + " " + \
+                    "restart" + " " + \
+                    "pki-apached" + "@" + \
                     config.pki_master_dict['pki_instance_name'] + "." + "service"
             elif config.pki_master_dict['pki_subsystem'] in\
                  config.PKI_TOMCAT_SUBSYSTEMS:
-                config.pki_master_dict['pki_registry_initscript_command'] =\
-                    "systemctl" + " " +\
-                    "restart" + " " +\
-                    "pki-tomcatd" + "@" +\
+                config.pki_master_dict['pki_registry_initscript_command'] = \
+                    "systemctl" + " " + \
+                    "restart" + " " + \
+                    "pki-tomcatd" + "@" + \
                     config.pki_master_dict['pki_instance_name'] + "." + "service"
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
diff --git a/base/server/src/scriptlets/configuration.py b/base/server/src/scriptlets/configuration.py
index 1ded5e566055446895d5dd9116fd772ae7b0fe73..a5a1b0ee77d0f256dd6c66f66f0b1a7521eaf221 100644
--- a/base/server/src/scriptlets/configuration.py
+++ b/base/server/src/scriptlets/configuration.py
@@ -121,7 +121,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
         elif master['pki_instance_type'] == "Tomcat":
             # CA, KRA, OCSP, or TKS
             data = util.Config_client().construct_pki_configuration_data()
-        
+
         # Configure the substem
         util.Config_client().configure_pki_data(
             json.dumps(data, cls=pki.encoder.CustomTypeEncoder))
diff --git a/base/server/src/scriptlets/infrastructure_layout.py b/base/server/src/scriptlets/infrastructure_layout.py
index e76ab90556ddca55f40264ecd4f497a1e53e7827..b1335266535be8a925d292bdebbff4722ad07444 100644
--- a/base/server/src/scriptlets/infrastructure_layout.py
+++ b/base/server/src/scriptlets/infrastructure_layout.py
@@ -61,7 +61,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
 
         print "Storing deployment configuration into " + config.pki_master_dict['pki_user_deployment_cfg_replica'] + "."
 
-        #Archive the user deployment configuration excluding the sensitive parameters
+        # Archive the user deployment configuration excluding the sensitive parameters
         sensitive_parameters = config.pki_master_dict['sensitive_parameters'].split()
         sections = config.user_config.sections()
         for s in sections:
@@ -106,7 +106,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             # util.directory.delete(master['pki_log_path'])
             # remove top-level infrastructure configuration
             if util.Directory.is_empty(master['pki_configuration_path'])\
-               and master['pki_configuration_path'] !=\
+               and master['pki_configuration_path'] != \
                config.PKI_DEPLOYMENT_CONFIGURATION_ROOT:
                 util.Directory.delete(master['pki_configuration_path'])
             # remove top-level infrastructure registry
diff --git a/base/server/src/scriptlets/security_databases.py b/base/server/src/scriptlets/security_databases.py
index d870db7c9897e6f15f24d0359a5d83069c398401..9ba6b916a6c025f3d2397824b31506845ae31e3a 100644
--- a/base/server/src/scriptlets/security_databases.py
+++ b/base/server/src/scriptlets/security_databases.py
@@ -63,7 +63,7 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
             config.PKI_DEPLOYMENT_DEFAULT_SECURITY_DATABASE_PERMISSIONS)
 
         if len(util.Instance.tomcat_instance_subsystems()) < 2:
-            # only create a self signed cert for a new instance  
+            # only create a self signed cert for a new instance
             rv = util.Certutil.verify_certificate_exists(
                  master['pki_database_path'],
                  master['pki_cert_database'],
diff --git a/base/server/src/scriptlets/slot_substitution.py b/base/server/src/scriptlets/slot_substitution.py
index 9cef6a55339d561417fbf5a0a5b35dfc2bfa1240..0395da2322f4fbb181b2a5c215854b5ccdfcf683 100644
--- a/base/server/src/scriptlets/slot_substitution.py
+++ b/base/server/src/scriptlets/slot_substitution.py
@@ -75,13 +75,13 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
                 master['pki_target_subsystem_web_xml'])
             # Strip "<filter>" section from subsystem "web.xml"
             # This is ONLY necessary because XML comments cannot be "nested"!
-            #util.file.copy(master['pki_target_subsystem_web_xml'],
+            # util.file.copy(master['pki_target_subsystem_web_xml'],
             #               master['pki_target_subsystem_web_xml_orig'])
-            #util.file.delete(master['pki_target_subsystem_web_xml'])
-            #util.xml_file.remove_filter_section_from_web_xml(
+            # util.file.delete(master['pki_target_subsystem_web_xml'])
+            # util.xml_file.remove_filter_section_from_web_xml(
             #    master['pki_target_subsystem_web_xml_orig'],
             #    master['pki_target_subsystem_web_xml'])
-            #util.file.delete(master['pki_target_subsystem_web_xml_orig'])
+            # util.file.delete(master['pki_target_subsystem_web_xml_orig'])
             if master['pki_subsystem'] == "CA":
                 util.File.copy_with_slot_substitution(
                     master['pki_source_proxy_conf'],
-- 
1.7.10.2

