Skip to content

Commit

Permalink
ESSNTL-5101: disable libdnf info logging (#3871)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mraka <[email protected]>
  • Loading branch information
MichaelMraka authored Aug 4, 2023
1 parent 7b15f9d commit 946b451
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions insights/specs/datasources/yum_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Custom datasource for collecting yum updates
"""
import json
import logging
import time

from insights import datasource, HostContext, SkipComponent
Expand Down Expand Up @@ -52,6 +53,7 @@ def sorted_pkgs(self, pkgs):
return sorted_cmp([pkg for pkg in pkgs if pkg.reponame != "@System"], self.pkg_cmp)

def load(self):
logging.disable(logging.WARNING)
cli = dnf.cli.Cli(self.base)
cli._read_conf_file()
subst = self.base.conf.substitutions
Expand All @@ -72,6 +74,7 @@ def load(self):
# RepoError is raised when cache is empty
pass
self.repos = self.base.repos
logging.disable(logging.NOTSET)

def installed_packages(self):
return self.packages.installed().run()
Expand Down

0 comments on commit 946b451

Please sign in to comment.