def db_stat()

in dcrpm/rpmutil.py [0:0]


    def db_stat(self):
        # type: () -> None
        """
        Runs `db_stat -CA` which offers a view into the state of Berkeley DB
        environment.
        """
        try:
            ds = run_with_timeout(
                [self.stat_path, "-CA", "-h", self.dbpath],
                RPM_CHECK_TIMEOUT_SEC,
                raise_on_nonzero=False,
            )
            if ds.returncode > 0:
                # Sometimes db_stat can fail, let's try to preserve that
                debug = ds.stderr
            else:
                debug = ds.stdout
            self.status_logger.debug(debug, extra={"key": "db_stat"})
        except DcRPMException:
            # This is debug command, we're ignoring failures
            self.logger.error("db_stat -CA failed")