#NEWLINE# def add_reactor( self , tag , reaction ) : #NEWLINE# #INDENT# '\n        Add a reactor\n        ' #NEWLINE# reactors = self . list_all ( ) #NEWLINE# for reactor in reactors : #NEWLINE# #INDENT# _tag = next ( iterkeys ( reactor ) ) #NEWLINE# if ( _tag == tag ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'status' : False , #NEWLINE# 'comment' : 'Reactor already exists.' , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# self . minion . opts [ 'reactor' ] . append ( { #NEWLINE# #INDENT# tag : reaction , #NEWLINE# #UNINDENT# } ) #NEWLINE# return { #NEWLINE# #INDENT# 'status' : True , #NEWLINE# 'comment' : 'Reactor added.' , #NEWLINE# #UNINDENT# }