Skip to content

Commit

Permalink
Fix UnboundLocalError when default queue could not be created
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Aug 26, 2021
1 parent a6498a9 commit 29d89a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dpctl/_sycl_queue.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,11 @@ cdef class SyclQueue(_SyclQueue):
.format(arg)
)
elif status == -2 or status == -8:
default_dev_error = (
"Default SYCL Device could not be created."
)
raise SyclQueueCreationError(
default_dev_error if (len_args == 0) else
"SYCL Device '{}' could not be created.".format(arg)
)
elif status == -3 or status == -7:
Expand Down

0 comments on commit 29d89a2

Please sign in to comment.