aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-04-18 20:42:39 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-05-10 12:28:35 -0500
commitf61ec74821a341e0142297872c95e87b55b7da4d (patch)
tree680a53e346ed44d2667436fc036c4b87ac06c2d0 /src
parent2b62258a39880518403456bab487360b46ff02f7 (diff)
downloadcryptography-f61ec74821a341e0142297872c95e87b55b7da4d.tar.gz
cryptography-f61ec74821a341e0142297872c95e87b55b7da4d.tar.bz2
cryptography-f61ec74821a341e0142297872c95e87b55b7da4d.zip
use list comprehension syntax to make this cleaner
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py
index 3509303f..eb7731fc 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -464,7 +464,7 @@ class AccessDescription(object):
class CertificatePolicies(object):
def __init__(self, policies):
- if not all(map(lambda x: isinstance(x, PolicyInformation), policies)):
+ if not all(isinstance(x, PolicyInformation) for x in policies):
raise TypeError(
"Every item in the policies list must be a "
"PolicyInformation"
@@ -489,9 +489,7 @@ class PolicyInformation(object):
self._policy_identifier = policy_identifier
if policy_qualifiers and not all(
- map(
- lambda x: isinstance(x, PolicyQualifierInfo), policy_qualifiers
- )
+ isinstance(x, PolicyQualifierInfo) for x in policy_qualifiers
):
raise TypeError(
"policy_qualifiers must be a list of PolicyQualifierInfo "
@@ -558,7 +556,7 @@ class NoticeReference(object):
def __init__(self, organization, notice_numbers):
self._organization = organization
if notice_numbers and not all(
- map(lambda x: isinstance(x, int), notice_numbers)
+ isinstance(x, int) for x in notice_numbers
):
raise TypeError(
"notice_numbers must be a list of integers or None"