#NEWLINE# def _CheckIsTrustedIpAddress( self , address ) : #NEWLINE# #INDENT# 'Check if the given ip address came from appserver or localhost.' #NEWLINE# valid_ip_networks = ( '169.254' , '192.168' ) #NEWLINE# if ( address == '10.0.2.2' ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return ( self . _CheckIsValidAddress ( valid_ip_networks , 2 , address ) or self . _CheckIsLocalAddress ( address ) )