def _poke_index()

in dcrpm/rpmutil.py [0:0]


    def _poke_index(self, cmd, checks):
        # type: (t.Sequence[str], t.Iterable[t.Callable[[CompletedProcess], bool]]) -> CompletedProcess
        """
        Run cmd, and ensure all checks are True. Raise DBIndexNeedsRebuild otherwise
        """
        proc = run_with_timeout(cmd, RPM_CHECK_TIMEOUT_SEC, raise_on_nonzero=False)
        for check in checks:
            if not check(proc):
                raise DBIndexNeedsRebuild

        return proc