parameters: (self)
return_statement: return result
docstring: Return the list of hostnames which are mirrors for this index.
          :return: A (possibly empty) list of hostnames of mirrors.
docstring_summary: Return the list of hostnames which are mirrors for this index.
          :return: A (possibly empty) list of hostnames of mirrors.
docstring_tokens: Return the list of hostnames which are mirrors for this index . : return : A ( possibly empty ) list of hostnames of mirrors .
function: def mirrors(self):
          """
          Return the list of hostnames which are mirrors for this index.
          :return: A (possibly empty) list of hostnames of mirrors.
          """
          result = []
          try:
              host = socket.gethostbyname_ex(self.mirror_host)[0]
          except socket.gaierror: # pragma: no cover
              host = None
          if host:
              last, rest = host.split('.', 1)
              n = len(last)
              host_list = (''.join(w) for w in itertools.chain.from_iterable(
                          itertools.product(ascii_lowercase, repeat=i)
                          for i in range(1, n + 1)))
              for s in host_list:
                  result.append('.'.join((s, rest)))
                  if s == last:
                      break
          return result
function_tokens: def mirrors ( self ) : result = [ ] try : host = socket . gethostbyname_ex ( self . mirror_host ) [ 0 ] except socket . gaierror : # pragma: no cover host = None if host : last , rest = host . split ( '.' , 1 ) n = len ( last ) host_list = ( '' . join ( w ) for w in itertools . chain . from_iterable ( itertools . product ( ascii_lowercase , repeat = i ) for i in range ( 1 , n + 1 ) ) ) for s in host_list : result . append ( '.' . join ( ( s , rest ) ) ) if s == last : break return result