#NEWLINE# def stop( self ) : #NEWLINE# #INDENT# if self . _running : #NEWLINE# #INDENT# if ( e . retry and self . retry . iactive ( ) ) : #NEWLINE# #INDENT# self . retry . cancel ( ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . _sw_pin . stop_detect ( ) #NEWLINE# self . _dt_pin . stop_detect ( ) #NEWLINE# self . _clk_pin . stop_detect ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# _log . warning ( ( 'Could not remove event detect: %r' % ( e , ) ) ) #NEWLINE# #UNINDENT# self . _running = False