def translate_snapshot_exception(method):
    def wrapper(self, ctx, snapshot_id, *args, **kwargs):
        try:
            res = method(self, ctx, snapshot_id, *args, **kwargs)
        except (cinder_exception.ClientException,
                keystone_exception.ClientException):
            exc_type, exc_value, exc_trace = sys.exc_info()
            if isinstance(exc_value, (keystone_exception.NotFound,
                                      cinder_exception.NotFound)):
                exc_value = exception.SnapshotNotFound(snapshot_id=snapshot_id)
            six.reraise(exc_value, None, exc_trace)
        return res
    return translate_cinder_exception(wrapper)
Create a user.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/volume/cinder.py/translate_snapshot_exception--crossover with--dataset/ETHPy150Open darcyliu/storyboard/boto/iam/connection.py/IAMConnection.create_user