#NEWLINE# def mark_inactive( self , **kwargs ) : #NEWLINE# #INDENT# self . is_active = False #NEWLINE# self . save ( ) #NEWLINE# if kwargs . get ( 'error_message' ) : #NEWLINE# #INDENT# logger . debug ( 'Device %s (%s) marked inactive due to error: %s' , self . dev_id , kwargs . name , kwargs [ 'error_message' ] )