From 6e198b0092a2a320887a234db5227a8c1daa49be Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 12 May 2015 15:53:38 -0500 Subject: notice_numbers are not optional in NoticeReference --- src/cryptography/x509.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3