#NEWLINE# @ classmethod #NEWLINE# @ jsonify #NEWLINE# def set_poll_interval( cls ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# poll_interval = float ( request . params [ 'value' ] ) #NEWLINE# if ( cls <= 0 ) : #NEWLINE# #INDENT# raise ValueError #NEWLINE# #UNINDENT# ServiceStatus . set_poll_interval ( poll_interval ) #NEWLINE# return { #NEWLINE# #INDENT# 'ok' : True , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# except ( KeyError , ValueError ) : #NEWLINE# #INDENT# response . status_int = 400 #NEWLINE# return { #NEWLINE# #INDENT# 'ok' : False , #NEWLINE# 'msg' : 'Polling interval must be a positive value' , #NEWLINE# #UNINDENT# }