diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-04 19:42:36 -0600 |
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-01-09 11:53:48 -0600 |
| commit | 5e612d0ac078bae569dece5f718166a834fa9f7e (patch) | |
| tree | 54fcdd690f6d8224753674061e1de79b4b680bda /cryptography | |
| parent | 5001c3f7479ff28457948a582e5e7446ac838ca6 (diff) | |
| download | cryptography-5e612d0ac078bae569dece5f718166a834fa9f7e.tar.gz cryptography-5e612d0ac078bae569dece5f718166a834fa9f7e.tar.bz2 cryptography-5e612d0ac078bae569dece5f718166a834fa9f7e.zip | |
add is_available() to CommonCrypto binding, use it for skipif
Diffstat (limited to 'cryptography')
| -rw-r--r-- | cryptography/hazmat/bindings/commoncrypto/binding.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/commoncrypto/binding.py b/cryptography/hazmat/bindings/commoncrypto/binding.py index 796135fc..ac5997ea 100644 --- a/cryptography/hazmat/bindings/commoncrypto/binding.py +++ b/cryptography/hazmat/bindings/commoncrypto/binding.py @@ -13,7 +13,9 @@ from __future__ import absolute_import, division, print_function -from cryptography.hazmat.bindings.utils import build_ffi +from cryptography.hazmat.bindings.utils import ( + build_ffi, binding_available +) class Binding(object): @@ -38,3 +40,7 @@ class Binding(object): cls.ffi, cls.lib = build_ffi(cls._module_prefix, cls._modules, "", "", []) + + @classmethod + def is_available(cls): + return binding_available(cls._ensure_ffi_initialized) |
