Skip to content

Commit

Permalink
Fix error message text
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jan 24, 2020
1 parent 8a9dbf9 commit 4d03dbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aiohttp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ def create_task(coro: Awaitable[_T]) -> 'asyncio.Task[_T]':
def get_running_loop() -> asyncio.AbstractEventLoop:
loop = asyncio.get_event_loop()
if not loop.is_running():
raise RuntimeError("The object should be created from async function")
raise RuntimeError(
"The object should be created within an async function"
)
return loop


Expand Down

0 comments on commit 4d03dbb

Please sign in to comment.