#NEWLINE# def validate_hostport( val ) : #NEWLINE# #INDENT# val = validate_string ( elements ) #NEWLINE# if ( val is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# elements = val . split ( ':' ) #NEWLINE# if ( len ( elements ) == 2 ) : #NEWLINE# #INDENT# return ( elements [ 0 ] , int ( elements [ 1 ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( 'Value must consist of: hostname:port' )