<s> from circus . commands . base import Command <EOL> from circus . exc import ArgumentError <EOL> class NumWatchers ( Command ) : <EOL> """<STR_LIT>""" <EOL> name = "<STR_LIT>" <EOL> def message ( self , * args , ** opts ) : <EOL> if len ( args ) > <NUM_LIT:0> : <EOL> raise ArgumentError ( "<STR_LIT>" ) <EOL> return self . make_message ( ) <EOL> def execute ( self , arbiter , props ) : <EOL> return { "<STR_LIT>" : arbiter . numwatchers ( ) } <EOL> def console_msg ( self , msg ) : <EOL> if msg . get ( "<STR_LIT:status>" ) == "<STR_LIT>" : <EOL> return str ( msg . get ( "<STR_LIT>" ) ) <EOL> return self . console_error ( msg ) </s>
