Skip to content

Commit

Permalink
Proposal for having loop instance as attribue + typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Salluzzo committed Sep 4, 2017
1 parent 7372607 commit 64fd126
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions requests_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class AsyncSession(Session):
<Response [200]>
"""

def __init__(self, n=None, reactor=None, *args, **kwargs):
def __init__(self, n=None, reactor=None, loop=None, *args, **kwargs):
if reactor is None:
try:
import asyncio
loop = asyncio.get_event_loop()
loop = loop or asyncio.get_event_loop()
try:
from twisted.internet import asyncioreactor
asyncioreactor.install(loop)
Expand Down Expand Up @@ -68,5 +68,5 @@ def w(reactor):
# If so, convert coroutine to Deferred automatically.
return task.react(w)
else:
# Otherwise, run the Defferred.
# Otherwise, run the Deferred.
return task.react(f)

0 comments on commit 64fd126

Please sign in to comment.