def get_section_as_ordered_pairs()

in build/fbcode_builder/getdeps/manifest.py [0:0]


    def get_section_as_ordered_pairs(self, section, ctx=None):
        """Used for eg: shipit.pathmap which has strong
        ordering requirements"""
        res = []
        ctx = ctx or {}

        for s in self._config.sections():
            if s != section:
                if not s.startswith(section + "."):
                    continue
                expr = parse_conditional_section_name(s, section)
                if not expr.eval(ctx):
                    continue

            for key in self._config.options(s):
                value = self._config.get(s, key)
                res.append((key, value))
        return res