Skip to content

Commit 7ebe75a

Browse files
committed
Replace deprecated asyncio.iscoroutinefunction
1 parent 622a19b commit 7ebe75a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyhap/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
22
import base64
33
import functools
4+
import inspect
45
import random
56
import socket
67
import sys
@@ -41,7 +42,7 @@ def iscoro(func):
4142
"""
4243
if isinstance(func, functools.partial):
4344
func = func.func
44-
return asyncio.iscoroutinefunction(func)
45+
return inspect.iscoroutinefunction(func)
4546

4647

4748
def get_local_address() -> str:

0 commit comments

Comments
 (0)