Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _raise_from_status(self):
status = lib.mongocrypt_status_new()
try:
lib.mongocrypt_ctx_status(self.__ctx, status)
exc = MongoCryptError.from_status(status)
finally:
lib.mongocrypt_status_destroy(status)
raise exc