#NEWLINE# def cidr_to_glob( cidr ) : #NEWLINE# #INDENT# '\n    A function that accepts an IP subnet in a glob-style format and returns\n    a list of CIDR subnets that exactly matches the specified glob.\n\n    :param cidr: an IP object CIDR subnet.\n\n    :return: a list of one or more IP addresses and subnets.\n    ' #NEWLINE# ip = IPNetwork ( cidr ) #NEWLINE# globs = iprange_to_globs ( ip [ 0 ] , ip [ ( - 1 ) ] ) #NEWLINE# if ( len ( globs ) != 1 ) : #NEWLINE# #INDENT# raise AddrConversionError ( 'bad CIDR to IP glob conversion!' ) #NEWLINE# #UNINDENT# return ip [ 0 ]