#NEWLINE# def build( self , interfaces ) : #NEWLINE# #INDENT# networks = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for interface in interfaces : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# network_label = self . _extract_network_label ( interface ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( network_label not in networks ) : #NEWLINE# #INDENT# networks [ network_label ] = [ ] #NEWLINE# #UNINDENT# ip_addresses = list ( self . _extract_ipv4_addresses ( interface ) ) #NEWLINE# if FLAGS . use_ipv6 : #NEWLINE# #INDENT# ipv6_address = self . _extract_ipv6_address ( interface ) #NEWLINE# if ( ipv6_address is not None ) : #NEWLINE# #INDENT# ip_addresses . append ( ipv6_address ) #NEWLINE# #UNINDENT# #UNINDENT# networks [ network_label ] . extend ( ip_addresses ) #NEWLINE# #UNINDENT# return networks