#NEWLINE# def check( self , ip , port = None ) : #NEWLINE# #INDENT# ' Snags the version off the default getVersion\n        method.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# rport = ( self . port if ( port is None ) else port ) #NEWLINE# url = 'http://{0}:{1}{2}' . format ( ip , rport , self . uri ) #NEWLINE# response = utility . requests_get ( url ) #NEWLINE# if ( response . status_code is 200 ) : #NEWLINE# #INDENT# data = findall ( 'version is (.*?)</' , response . content . translate ( None , '\n' ) ) #NEWLINE# if ( ( len ( data ) > 0 ) and ( self . version in data [ 0 ] ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except exceptions . Timeout : #NEWLINE# #INDENT# utility . Msg ( '{0} timeout to {1}:{2}' . format ( self . platform , data , rport ) , LOG . DEBUG ) #NEWLINE# #UNINDENT# except exceptions . ConnectionError : #NEWLINE# #INDENT# utility . Msg ( '{0} connection error to {1}:{2}' . format ( self . platform , ip , rport ) , LOG . DEBUG ) #NEWLINE# #UNINDENT# return False