Browse Source

Fixed: wrong run_until_complete calling

main
nibrag 8 years ago
parent
commit
21bce1911f
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      README.rst

+ 3
- 3
README.rst View File

@@ -70,10 +70,10 @@ aiohttp usage
with aiohttp.ClientSession(connector=conn) as ses:
async with session.get('http://github.com/') as resp:
if resp.status == 200:
return await resp.text()
print(await resp.text())
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete()
loop.close()
loop.run_until_complete(load_github_main())
loop.close()

Loading…
Cancel
Save