Skip to content

Commit 7b368a1

Browse files
Merge pull request #922 from IntelPython/fix-unbound-local-error
Fixing UnboundLocalError raised in _sycl_queue.pyx:347
2 parents b07d2d8 + 7d05d7c commit 7b368a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpctl/_sycl_queue.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ cdef class SyclQueue(_SyclQueue):
344344
)
345345
elif status == -3 or status == -7:
346346
raise SyclQueueCreationError(
347-
"SYCL Context could not be created from '{}'.".format(arg)
347+
"SYCL Context could not be created "
348+
("by default constructor" if len_args == 0 else
349+
"from '{}'.".format(arg)
350+
)
348351
)
349352
elif status == -4 or status == -6:
350353
if len_args == 2:

0 commit comments

Comments
 (0)