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

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

src/s/y/synnefo-HEAD/snf-astakos-app/astakos/im/management/commands/project-modify.py   synnefo(Download)
def make_policies(limits):
    policies = {}
    for (name, member_capacity, project_capacity) in limits:
        try:
            member_capacity = units.parse(member_capacity)
            project_capacity = units.parse(project_capacity)

src/s/y/synnefo-HEAD/snf-astakos-app/astakos/api/projects.py   synnefo(Download)
def _parse_max_members(s):
    try:
        max_members = units.parse(s)
        if max_members < 0:
            raise faults.BadRequest("Invalid max_members")

src/s/y/synnefo-HEAD/snf-astakos-app/astakos/im/management/commands/_filtering.py   synnefo(Download)
def parse_with_unit(value):
    try:
        return units.parse(value)
    except units.ParseError:
        raise CommandError("Failed to parse value, should be an integer, "