def find_current_version(package, cur_version, index_urls=None):

    if index_urls is None:
        index_urls = ['http://pypi.python.org/pypi']

    for index_url in index_urls:
        pypi = xmlrpclib.ServerProxy(index_url, xmlrpclib.Transport())
        pypi_hits = pypi.package_releases(package)
        if len(pypi_hits) > 0:
            if semver.Version(pypi_hits[0]) > cur_version:
                return semver.Version(pypi_hits[0])

    return False
dataset/ETHPy150Open wercker/wercker-cli/werckercli/commands/update.py/find_current_version/original