Esempio n. 1
0
def _run_opdef(run):
    try:
        gf = guildfile.for_run(run)
    except (guildfile.NoModels, TypeError):
        return None
    else:
        assert run.opref, run.path
        try:
            m = gf.models[run.opref.model_name]
        except KeyError:
            return None
        else:
            return m.get_operation(run.opref.op_name)
Esempio n. 2
0
def run_guildfile(run):
    try:
        return guildfile.for_run(run)
    except (guildfile.NoModels, guildfile.GuildfileMissing, TypeError):
        return None