mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
examples/webrtc/signalling: Fix compatibility with Python 3.10
Fix asyncio throwing a deprecation warning when using asyncio.get_event_loop(). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3201>
This commit is contained in:
parent
6bb564968b
commit
3e4f94db14
2 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ async def hello():
|
|||
print('Our uid is {!r}'.format(PEER_ID))
|
||||
|
||||
try:
|
||||
asyncio.get_event_loop().run_until_complete(hello())
|
||||
asyncio.run(hello())
|
||||
except websockets.exceptions.InvalidHandshake:
|
||||
print('Invalid handshake: are you sure this is a websockets server?\n')
|
||||
raise
|
||||
|
|
|
@ -78,7 +78,7 @@ async def hello():
|
|||
print('Our uid is {!r}'.format(PEER_ID))
|
||||
|
||||
try:
|
||||
asyncio.get_event_loop().run_until_complete(hello())
|
||||
asyncio.run(hello())
|
||||
except websockets.exceptions.InvalidHandshake:
|
||||
print('Invalid handshake: are you sure this is a websockets server?\n')
|
||||
raise
|
||||
|
|
Loading…
Reference in a new issue