summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/common/python/pki/cert.py10
-rw-r--r--base/common/python/pki/systemcert.py1
2 files changed, 5 insertions, 6 deletions
diff --git a/base/common/python/pki/cert.py b/base/common/python/pki/cert.py
index c03bf6007..05db87c73 100644
--- a/base/common/python/pki/cert.py
+++ b/base/common/python/pki/cert.py
@@ -603,12 +603,10 @@ class CertReviewResponse(CertEnrollmentRequest):
profile_policy_sets = attr_list['ProfilePolicySet']
if not isinstance(profile_policy_sets, list):
- review_response.policy_sets.append(
- profile.ProfilePolicySet.from_json(profile_policy_sets))
- else:
- for policy_set in profile_policy_sets:
- review_response.policy_sets.append(
- profile.ProfilePolicySet.from_json(policy_set))
+ profile_policy_sets = [profile_policy_sets]
+ for policy_set in profile_policy_sets:
+ review_response.policy_sets.append( # pylint: disable=E1101
+ profile.ProfilePolicySet.from_json(policy_set))
return review_response
diff --git a/base/common/python/pki/systemcert.py b/base/common/python/pki/systemcert.py
index a7d4e1c71..ed41be96c 100644
--- a/base/common/python/pki/systemcert.py
+++ b/base/common/python/pki/systemcert.py
@@ -54,6 +54,7 @@ class SystemCertClient(object):
cert_data = CertData.from_json(response.json())
pem = cert_data.encoded
+ # pylint: disable=E0012,E1136
b64 = pem[len(pki.CERT_HEADER):len(pem) - len(pki.CERT_FOOTER)]
cert_data.binary = decode_cert(b64)