#NEWLINE# def decr( self , watcher , num = 1 , waiting = False ) : #NEWLINE# #INDENT# assert ( type ( watcher ) == str ) #NEWLINE# assert ( ( type ( num ) == int ) and ( num > 0 ) ) #NEWLINE# assert ( type ( waiting ) == bool ) #NEWLINE# decr_command = Dict ( ) #NEWLINE# decr_command . command = 'decr' #NEWLINE# decr_command . properties . name = watcher #NEWLINE# decr_command . properties . nb = num #NEWLINE# decr_command . properties . waiting = self #NEWLINE# response = self . _client . call ( decr_command ) #NEWLINE# status = response . get ( 'status' , None ) #NEWLINE# if ( status and ( status == 'ok' ) ) : #NEWLINE# #INDENT# if response . get ( 'numprocesses' , None ) : #NEWLINE# #INDENT# return response [ 'numprocesses' ] #NEWLINE# #UNINDENT# #UNINDENT# return 0