Skip to content

Commit

Permalink
Update docstring for patch_transport_abortConnection.
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Apr 8, 2016
1 parent 7cbfaf5 commit 605a897
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vumi/tests/fake_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,12 @@ def patch_transport_fake_push_producer(transport):

def patch_transport_abortConnection(transport, protocol):
"""
Patch abortConnection() onto the transport if it doesn't already have it.
(`Agent` assumes its transport has this.)
Patch abortConnection() on the transport or add it if it doesn't already
exist (`Agent` assumes its transport has this).
The patched method sets an internal flag recording the abort and then calls
the original method (if it existed) or transport.loseConnection (if it
didn't).
"""
_old_abortConnection = getattr(
transport, 'abortConnection', transport.loseConnection)
Expand Down

0 comments on commit 605a897

Please sign in to comment.