diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2016-03-19 11:58:32 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-03-19 11:58:32 -0400 |
commit | 57eec7fda04034b70681adda53b2d564eed33ef7 (patch) | |
tree | 8d5ceda8a411b9d295583e1602469bf3d054b600 | |
parent | 3ee4fc78271a73468ec4d2f7aaf3d712a4828d6d (diff) | |
download | cryptography-57eec7fda04034b70681adda53b2d564eed33ef7.tar.gz cryptography-57eec7fda04034b70681adda53b2d564eed33ef7.tar.bz2 cryptography-57eec7fda04034b70681adda53b2d564eed33ef7.zip |
Use runtimeerror for this
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/binding.py | 3 | ||||
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index 73457092..0f7a9d95 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -227,8 +227,7 @@ def _verify_openssl_version(version): utils.DeprecatedIn12 ) else: - # TODO: what exception type? - raise Exception( + raise RuntimeError( "You are linking against OpenSSL 0.9.8, which is no longer " "support by the OpenSSL project. You need to upgrade to a " "newer version of OpenSSL." diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index 6b6b7474..34c23ab2 100644 --- a/tests/hazmat/bindings/test_openssl.py +++ b/tests/hazmat/bindings/test_openssl.py @@ -178,7 +178,6 @@ class TestOpenSSL(object): def test_verify_openssl_version(self, monkeypatch): monkeypatch.delenv("CRYPTOGRAPHY_ALLOW_OPENSSL_098", raising=False) - # TODO: what exception type? - with pytest.raises(Exception): + with pytest.raises(RuntimeError): # OpenSSL 0.9.8zg _verify_openssl_version(0x9081DF) |