def _get_base_url_and_installer_for_distro(distribution, build_server, branch):
 package = distribution
 if is_centos_or_rhel(distribution):
  installer = install_commands_yum
 elif is_ubuntu(distribution):
  installer = install_commands_ubuntu
 else:
  raise UnsupportedDistribution()
 if branch:
  result_path = posixpath.join('results/omnibus/', branch, package)
  base_url = urljoin(build_server, result_path)
 else:
  base_url = None
 return (base_url, installer)

def _get_base_url_and_installer_for_distro ( distribution , build_server , branch ) : package = distribution if is_centos_or_rhel ( distribution ) : installer = install_commands_yum elif is_ubuntu ( distribution ) : installer = install_commands_ubuntu else : raise UnsupportedDistribution ( ) if branch : result_path = posixpath . join ( 'results/omnibus/' , branch , package ) base_url = urljoin ( build_server , result_path ) else : base_url = None return ( base_url , installer )
get built artifact base url and installer for a given distribution .