summaryrefslogtreecommitdiffstats
path: root/base/server/python
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-08-15 17:15:24 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-08-16 12:10:38 -0400
commit0b8e4d2262f1b5a8956b5b3ef000981156785bd4 (patch)
treeaff735719637a57eefbf537ccc9e118663228aec /base/server/python
parent17d6be4d85741bffa21d93aceaff00223bc77dec (diff)
downloadpki-0b8e4d2262f1b5a8956b5b3ef000981156785bd4.tar.gz
pki-0b8e4d2262f1b5a8956b5b3ef000981156785bd4.tar.xz
pki-0b8e4d2262f1b5a8956b5b3ef000981156785bd4.zip
Fixed pylint false positive.
Under some circumstances build would fail due to pylint E1103 error saying "Instance of 'list' has no 'strip' member". This is a false positive since the object is actually a string. To avoid the error the code has been changed to explicitly convert the value to string.
Diffstat (limited to 'base/server/python')
-rw-r--r--base/server/python/pki/server/deployment/pkiparser.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index 8f03e5f2d..af8330c07 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -159,14 +159,18 @@ class PKIConfigParser:
def init_config(self):
# RESTEasy
- resteasy_lib = subprocess.check_output(\
+ resteasy_lib = subprocess.check_output(
'source /etc/pki/pki.conf && echo $RESTEASY_LIB',
- shell=True).strip()
+ shell=True)
+ # workaround for pylint error E1103
+ resteasy_lib = str(resteasy_lib).strip()
# JNI jar location
- jni_jar_dir = subprocess.check_output(\
+ jni_jar_dir = subprocess.check_output(
'source /usr/share/pki/etc/pki.conf && echo $JNI_JAR_DIR',
- shell=True).strip()
+ shell=True)
+ # workaround for pylint error E1103
+ jni_jar_dir = str(jni_jar_dir).strip()
if config.pki_subsystem in config.PKI_TOMCAT_SUBSYSTEMS:
default_instance_name = 'pki-tomcat'