Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions python/cuvs/cuvs/common/exceptions.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
#
# cython: language_level=3
Expand All @@ -14,10 +14,8 @@ class CuvsException(Exception):
def get_last_error_text():
""" returns the last error description from the cuvs c-api """
cdef const char* c_err = cuvsGetLastErrorText()
if c_err is NULL:
return
cdef bytes err = c_err
return err.decode("utf8", "ignore")
if c_err is not NULL:
return c_err.decode("utf8", "ignore")


def check_cuvs(status: cuvsError_t):
Expand Down
Loading