Raise exception if cryptography module is not available. Call this function in constructors.
(obj)
| 16 | |
| 17 | |
| 18 | def require_cryptography(obj): |
| 19 | """ |
| 20 | Raise exception if cryptography module is not available. |
| 21 | Call this function in constructors. |
| 22 | """ |
| 23 | if not CRYPTOGRAPHY_AVAILABLE: |
| 24 | raise UaError("Can't use {0}, cryptography module is not installed".format(obj.__class__.__name__)) |
| 25 | |
| 26 | |
| 27 | class Signer(object): |
no test coverage detected