Skip to content

Commit

Permalink
Revert asyncio.run back to run_until_complete
Browse files Browse the repository at this point in the history
Check #186
  • Loading branch information
ttu committed Sep 7, 2022
1 parent c0d22b2 commit 34b2680
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def main():
print(f'Data: {found_data[1]}')

if __name__ == '__main__':
asyncio.run(main())
asyncio.get_event_loop().run_until_complete(main())
```

The optional list of MACs and run flag can be passed to the `get_data_async` function.
Expand Down Expand Up @@ -387,7 +387,7 @@ async def main():
print(data)

if __name__ == '__main__':
asyncio.run(main())
asyncio.get_event_loop().run_until_complete(main())
```

Check [get_async_bleak](https://github.com/ttu/ruuvitag-sensor/blob/master/examples/get_async_bleak.py) from examples.
Expand Down
2 changes: 1 addition & 1 deletion examples/get_async_bleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ async def main():
print(data)

if __name__ == '__main__':
asyncio.run(main())
asyncio.get_event_loop().run_until_complete(main())

0 comments on commit 34b2680

Please sign in to comment.