Skip to content

Commit

Permalink
Log a distinctive error when the 'package' comp obj can't get a 'dpkg…
Browse files Browse the repository at this point in the history
… -l'

Instead of misreporting a "package not installed".
  • Loading branch information
cvaroqui committed Jun 21, 2018
1 parent 5ad425a commit 08c727f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions var/compliance/com.opensvc/package.py
Expand Up @@ -643,11 +643,10 @@ def rpm_get_installed_packages(self):
return out.splitlines()

def deb_get_installed_packages(self):
p = Popen(['dpkg', '-l'], stdout=PIPE)
(out, err) = p.communicate()
p = Popen(['dpkg', '-l'], stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
if p.returncode != 0:
perror('can not fetch installed packages list')
return []
raise Exception('can not fetch installed packages list: %s' % err)
l = []
out = bdecode(out)
for line in out.splitlines():
Expand Down

0 comments on commit 08c727f

Please sign in to comment.