Skip to content

Commit 78b48d6

Browse files
authored
Merge pull request #642 from mattia-lecci/bugfix-asyncio
bugfix: deprecated asyncio usage since python 3.9
2 parents e172b38 + 92e2431 commit 78b48d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyshark/capture/capture.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def _setup_eventloop(self):
173173
else:
174174
# On Python before 3.8, Proactor is not the default eventloop type, so we have to create a new one.
175175
# If there was an existing eventloop this can create issues, since we effectively disable it here.
176-
if asyncio.Task.all_tasks():
176+
if asyncio.all_tasks():
177177
warnings.warn("The running eventloop has tasks but pyshark must set a new eventloop to continue. "
178178
"Existing tasks may not run.")
179179
self.eventloop = asyncio.ProactorEventLoop()

0 commit comments

Comments
 (0)