aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-05-12 21:48:11 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-05-12 21:48:11 -0400
commit0facc2a21462721e5a6105d43d50ebb85a1d11f6 (patch)
treec99659c364711f421f4235b5b11019b7e3cb1374 /src
parentfe35bd616e60980ea653a3d1f078e590d7689690 (diff)
parent66c6170c02d0b3c00a9a10951f7bb0d29341d34e (diff)
downloadcryptography-0facc2a21462721e5a6105d43d50ebb85a1d11f6.tar.gz
cryptography-0facc2a21462721e5a6105d43d50ebb85a1d11f6.tar.bz2
cryptography-0facc2a21462721e5a6105d43d50ebb85a1d11f6.zip
Merge pull request #1936 from reaperhulk/cp-noticenumbers-required
notice_numbers are not optional in NoticeReference
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py
index 173fd084..b0a4a352 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -568,11 +568,11 @@ class UserNotice(object):
class NoticeReference(object):
def __init__(self, organization, notice_numbers):
self._organization = organization
- if notice_numbers and not all(
+ if not isinstance(notice_numbers, list) or not all(
isinstance(x, int) for x in notice_numbers
):
raise TypeError(
- "notice_numbers must be a list of integers or None"
+ "notice_numbers must be a list of integers"
)
self._notice_numbers = notice_numbers