diff --git a/insights/parsers/installed_rpms.py b/insights/parsers/installed_rpms.py index 45f15cbf85..cd7010026d 100644 --- a/insights/parsers/installed_rpms.py +++ b/insights/parsers/installed_rpms.py @@ -78,7 +78,6 @@ from ..util import rsplit from .. import parser, get_active_lines, CommandParser from .rpm_vercmp import rpm_version_compare -from insights.parsers import SkipException from insights.specs import Specs # This list of architectures is taken from PDC (Product Definition Center): @@ -216,9 +215,6 @@ class InstalledRpms(CommandParser, RpmList): """ A parser for working with data containing a list of installed RPM files on the system and related information. - - Raises: - SkipException: When no packages are found. """ def __init__(self, *args, **kwargs): self.errors = [] @@ -248,8 +244,6 @@ def parse_content(self, content): except Exception: # Both ways failed self.unparsed.append(line) - if not self.packages: - raise SkipException() # Don't want defaultdict's behavior after parsing is complete self.packages = dict(self.packages) diff --git a/insights/parsers/tests/test_installed_rpms.py b/insights/parsers/tests/test_installed_rpms.py index 53851cf14f..fb6643c113 100644 --- a/insights/parsers/tests/test_installed_rpms.py +++ b/insights/parsers/tests/test_installed_rpms.py @@ -1,6 +1,5 @@ import pytest from insights.parsers.installed_rpms import InstalledRpms, InstalledRpm, pad_version -from insights.parsers import SkipException from insights.tests import context_wrap @@ -81,18 +80,6 @@ yum-security-1.1.16-21.el5.noarch '''.strip() -ERROR_DB_NO_PKG = """ -error: rpmdb: BDB0113 Thread/process 20263/140251984590912 failed: BDB1507 Thread died in Berkeley DB library -error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal -error, run database recovery -error: cannot open Packages index using db5 - (-30973) -error: cannot open Packages database in /var/lib/rpm -error: rpmdb: BDB0113 Thread/process 20263/140251984590912 failed: BDB1507 Thread died in Berkeley DB library -error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal -error, run database recovery -error: cannot open Packages database in /var/lib/rpm -""".strip() - ORACLEASM_RPMS = ''' oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64 oracleasmlib-2.0.4-1.el5.x86_64 @@ -211,9 +198,6 @@ def test_corrupt_db(): assert "yum-security" in rpms.packages assert rpms.corrupt is True - with pytest.raises(SkipException): - InstalledRpms(context_wrap(ERROR_DB_NO_PKG)) - def test_rpm_manifest(): rpms = InstalledRpms(context_wrap(RPM_MANIFEST))