@@ -107,14 +107,14 @@ def _build_response(self, tid):
107107 :param tid:
108108 :return:
109109 """
110- f = Future ()
110+ my_future = Future ()
111111
112112 if not self ._connected :
113- f .set_exception (ConnectionException ("Client is not connected" ))
114- return f
113+ my_future .set_exception (ConnectionException ("Client is not connected" ))
114+ return my_future
115115
116- self .transaction .addTransaction (f , tid )
117- return f
116+ self .transaction .addTransaction (my_future , tid )
117+ return my_future
118118
119119 def close (self ):
120120 """ Closes the underlying IOStream. """
@@ -176,8 +176,8 @@ def callback(*args): # pylint: disable=unused-argument
176176 txt = f"send: { hexlify_packets (packet )} "
177177 _logger .debug (txt )
178178 self .stream .write (packet , callback = callback )
179- f = self ._build_response (request .transaction_id )
180- return f
179+ response = self ._build_response (request .transaction_id )
180+ return response
181181
182182 def _handle_response (self , reply , ** kwargs ): # pylint: disable=unused-argument
183183 """ Handles a received response and updates a future
@@ -198,14 +198,14 @@ def _build_response(self, tid):
198198 :param tid:
199199 :return: Future
200200 """
201- f = Future ()
201+ my_future = Future ()
202202
203203 if not self ._connected :
204- f .set_exception (ConnectionException ("Client is not connected" ))
205- return f
204+ my_future .set_exception (ConnectionException ("Client is not connected" ))
205+ return my_future
206206
207- self .transaction .addTransaction (f , tid )
208- return f
207+ self .transaction .addTransaction (my_future , tid )
208+ return my_future
209209
210210 def close (self ):
211211 """ Closes the underlying IOStream. """
@@ -387,7 +387,7 @@ def _on_receive(fd, events):
387387 )
388388
389389 packet = self .framer .buildPacket (request )
390- f = self ._build_response (request .transaction_id )
390+ response = self ._build_response (request .transaction_id )
391391
392392 response_pdu_size = request .get_response_pdu_size ()
393393 expected_response_length = self .transaction ._calculate_response_length (response_pdu_size ) # pylint: disable=protected-access
@@ -401,7 +401,7 @@ def _on_receive(fd, events):
401401 self .timeout_handle = self .io_loop .add_timeout (time .time () + self .timeout , _on_timeout ) # pylint: disable=attribute-defined-outside-init
402402 self ._send_packet (packet , callback = _on_write_done )
403403
404- return f
404+ return response
405405
406406 def _send_packet (self , message , callback ):
407407 """ Sends packets on the bus with 3.5char delay between frames
0 commit comments