summaryrefslogtreecommitdiffstats
path: root/base/server/python/pki/server/deployment/pkihelper.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-01-15 13:51:13 +0100
committerChristian Heimes <cheimes@redhat.com>2016-01-25 15:55:53 +0100
commitcb6b0c4855885c03d056acb8f98c96de986e081e (patch)
treed622bc6e4e2ef9e4b4fcb46b8b70e80f6b0b17af /base/server/python/pki/server/deployment/pkihelper.py
parent0d2d97f9bf6802f6f81090eca6e135e50fea7883 (diff)
downloadpki-cb6b0c4855885c03d056acb8f98c96de986e081e.tar.gz
pki-cb6b0c4855885c03d056acb8f98c96de986e081e.tar.xz
pki-cb6b0c4855885c03d056acb8f98c96de986e081e.zip
Fix flake8 / PEP 8 violations
https://fedorahosted.org/pki/ticket/1738
Diffstat (limited to 'base/server/python/pki/server/deployment/pkihelper.py')
-rw-r--r--base/server/python/pki/server/deployment/pkihelper.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/base/server/python/pki/server/deployment/pkihelper.py b/base/server/python/pki/server/deployment/pkihelper.py
index c5c71ef99..0f5485a46 100644
--- a/base/server/python/pki/server/deployment/pkihelper.py
+++ b/base/server/python/pki/server/deployment/pkihelper.py
@@ -43,8 +43,18 @@ from pwd import getpwuid
import xml.etree.ElementTree as ET
from lxml import etree
import zipfile
-import selinux
+# PKI Deployment Imports
+from . import pkiconfig as config
+from .pkiconfig import pki_selinux_config_ports as ports
+from . import pkimanifest as manifest
+from . import pkimessages as log
+from .pkiparser import PKIConfigParser
+import pki.client
+import pki.system
+
+# special care for SELinux
+import selinux
seobject = None
if selinux.is_selinux_enabled():
try:
@@ -56,16 +66,6 @@ if selinux.is_selinux_enabled():
raise
-# PKI Deployment Imports
-from . import pkiconfig as config
-from .pkiconfig import pki_selinux_config_ports as ports
-from . import pkimanifest as manifest
-from . import pkimessages as log
-from .pkiparser import PKIConfigParser
-import pki.client
-import pki.system
-
-
# PKI Deployment Helper Functions
def pki_copytree(src, dst, symlinks=False, ignore=None):
"""Recursively copy a directory tree using copy2().
@@ -3908,8 +3908,8 @@ class ConfigClient:
message = root.findall('.//Message')[0].text
if message is not None:
config.pki_log.error(
- log.PKI_CONFIG_JAVA_CONFIGURATION_EXCEPTION + " "
- + message,
+ log.PKI_CONFIG_JAVA_CONFIGURATION_EXCEPTION + " " +
+ message,
extra=config.PKI_INDENTATION_LEVEL_2)
raise
@@ -4125,7 +4125,8 @@ class ConfigClient:
cert1.req_ext_data = \
self.mdict['pki_req_ext_data']
- if self.external and self.external_step_two: # external/existing CA step 2
+ if self.external and self.external_step_two:
+ # external/existing CA step 2
# If specified, load the externally-signed CA cert
if self.mdict['pki_external_ca_cert_path']:
@@ -4143,7 +4144,8 @@ class ConfigClient:
systemCerts.append(cert1)
- elif self.standalone and self.external_step_two: # standalone KRA/OCSP step 2
+ elif self.standalone and self.external_step_two:
+ # standalone KRA/OCSP step 2
cert1 = pki.system.SystemCertData()
cert1.tag = self.mdict['pki_ca_signing_tag']