mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-07 17:40:30 +00:00
Less verbose checking of installed packages
This commit is contained in:
parent
e740a3b4d8
commit
3993ff23a5
1 changed files with 1 additions and 2 deletions
|
@ -14,8 +14,7 @@ class CheckPackages(Task):
|
||||||
from subprocess import CalledProcessError
|
from subprocess import CalledProcessError
|
||||||
for package in info.host_packages:
|
for package in info.host_packages:
|
||||||
try:
|
try:
|
||||||
# Use "dpkg-query -W -f='${Status} ${Version}\n' package" instead
|
log_check_call(['/usr/bin/dpkg-query', '-W', package])
|
||||||
log_check_call(['/usr/bin/dpkg', '--status', package])
|
|
||||||
except CalledProcessError:
|
except CalledProcessError:
|
||||||
msg = "The package ``{0}\'\' is not installed".format(package)
|
msg = "The package ``{0}\'\' is not installed".format(package)
|
||||||
raise TaskError(msg)
|
raise TaskError(msg)
|
||||||
|
|
Loading…
Add table
Reference in a new issue