def parse_resources_from_sched_priv()

in pbspro/src/pbspro/parser.py [0:0]


    def parse_resources_from_sched_priv(self, path: str) -> Set[str]:

        with io.open(path, "r", encoding="utf-8") as fr:
            for line in fr.readlines():
                line = line.strip()
                if not line.startswith("resources:"):
                    continue
                line = line[len("resources:") :].strip().replace('"', "")
                return set([t.strip() for t in line.split(",")])
        raise RuntimeError(
            "Could not find line beginning with 'resources:' in file {}".format(path)
        )