Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/a/r/archversion-HEAD/src/lib/archversion/version.py   archversion(Download)
from archversion import USER_AGENT
from archversion.pacman import parse_pkgbuild, Pacman
from archversion.error import InvalidConfigFile, VersionNotFound
from collections import OrderedDict
from urllib.request import urlopen, Request
        if "url" not in value:
            logging.error("No url specified for %s" % name)
            raise InvalidConfigFile("Missing url in config file")
        url = value["url"]
        regex = value.get("regex", "%s[-_]v?(%s)%s" % (
                compare = value.get("compare", None)
                if compare is None:
                    raise InvalidConfigFile("No defined compare mode")
                if compare not in self.compare_table:
                    raise InvalidConfigFile("Invalid compare mode")