From a2bb9cbfb1e2c1a7427590c848c9ee89dfe177ef Mon Sep 17 00:00:00 2001 From: Dave Carlson Date: Wed, 31 Jul 2019 11:43:05 -0700 Subject: [PATCH] change empty CRL get_revoked to empty tuple --- src/OpenSSL/crypto.py | 3 +-- tests/test_crypto.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 5a734ccd9..8256688ae 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -2137,8 +2137,7 @@ def get_revoked(self): pyrev = Revoked.__new__(Revoked) pyrev._revoked = _ffi.gc(revoked_copy, _lib.X509_REVOKED_free) results.append(pyrev) - if results: - return tuple(results) + return tuple(results) def add_revoked(self, revoked): """ diff --git a/tests/test_crypto.py b/tests/test_crypto.py index 9d943a943..c929cb869 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -3117,7 +3117,7 @@ def test_construction(self): """ crl = CRL() assert isinstance(crl, CRL) - assert crl.get_revoked() is None + assert crl.get_revoked() is () def _get_crl(self): """