We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 030c8a1 commit 2ffbdcbCopy full SHA for 2ffbdcb
scrapy_playwright/_utils.py
@@ -122,10 +122,11 @@ def get_event_loop(cls) -> asyncio.AbstractEventLoop:
122
123
@classmethod
124
async def get_result(cls, coro) -> concurrent.futures.Future:
125
- return asyncio.run_coroutine_threadsafe(coro=coro, loop=cls.get_event_loop()).result()
+ return asyncio.run_coroutine_threadsafe(coro=coro, loop=cls.get_event_loop())
126
127
def _deferred_from_coro(coro) -> Deferred:
128
- return scrapy.utils.defer.deferred_from_coro(_WindowsAdapter.get_result(coro))
+ dfd = scrapy.utils.defer.deferred_from_coro(_WindowsAdapter.get_result(coro))
129
+ return dfd.addCallback(lambda future: future.result())
130
131
else:
132
_deferred_from_coro = scrapy.utils.defer.deferred_from_coro
0 commit comments