Skip to content

Commit 17f6d0c

Browse files
committed
Update and add docstring
1 parent 6cf42c4 commit 17f6d0c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
from netdata import Netdata
1111

1212

13-
@asyncio.coroutine
14-
def main():
13+
async def main():
14+
"""Get the data from a Netdata instance."""
1515
with aiohttp.ClientSession() as session:
1616
data = Netdata('localhost', 'system.cpu', loop, session)
17-
yield from data.async_get_data()
17+
await data.async_get_data()
1818

1919
print(json.dumps(data.values, indent=4, sort_keys=True))
2020

0 commit comments

Comments
 (0)