Skip to content

Commit d0e9ed1

Browse files
authored
use StopIteration.value in blocking client _iter_coroutine (#508)
1 parent 9471e33 commit d0e9ed1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

edgedb/blocking_client.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,9 @@ def _iter_coroutine(self, coro):
393393
try:
394394
coro.send(None)
395395
except StopIteration as ex:
396-
if ex.args:
397-
result = ex.args[0]
398-
else:
399-
result = None
396+
return ex.value
400397
finally:
401398
coro.close()
402-
return result
403399

404400
def _query(self, query_context: abstract.QueryContext):
405401
return self._iter_coroutine(super()._query(query_context))

0 commit comments

Comments
 (0)