diff options
author | Michal Minar <miminar@redhat.com> | 2013-09-02 13:56:19 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-09-02 13:57:28 +0200 |
commit | 52a121bd9c447e6bf97cc70c76a18b691fe460d9 (patch) | |
tree | b02450d98cbfb2aca05b23d7ac75f9a6c6533846 /commands/software | |
parent | e0290aed37192b120cbbb242056e5ac9e4ad6275 (diff) | |
download | openlmi-scripts-52a121bd9c447e6bf97cc70c76a18b691fe460d9.tar.gz openlmi-scripts-52a121bd9c447e6bf97cc70c76a18b691fe460d9.tar.xz openlmi-scripts-52a121bd9c447e6bf97cc70c76a18b691fe460d9.zip |
log some usefull message upon CheckResult's failure
Instead of simple 'failed', show at least what was expected and what has
has been obtained.
Diffstat (limited to 'commands/software')
-rw-r--r-- | commands/software/lmi/scripts/software/cmd.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/commands/software/lmi/scripts/software/cmd.py b/commands/software/lmi/scripts/software/cmd.py index 2c34fa6..1566c67 100644 --- a/commands/software/lmi/scripts/software/cmd.py +++ b/commands/software/lmi/scripts/software/cmd.py @@ -257,8 +257,8 @@ class Install(command.LmiCheckResult): try: software.install_from_uri(ns, _uri, force=_force) installed.append(_uri) - except errors.LmiFailed: - pass + except errors.LmiFailed as err: + LOG().warn('failed to install "%s": %s', _uri, err) for pkg_spec in package_array: identities = list(software.find_package(ns, @@ -275,8 +275,8 @@ class Install(command.LmiCheckResult): try: software.install_package(ns, identities[-1], force=_force) installed.append(pkg_spec) - except errors.LmiFailed: - pass + except errors.LmiFailed as err: + LOG().warn('failed to install "%s": %s', pkg_spec, err) return installed @@ -310,8 +310,8 @@ class Remove(command.LmiCheckResult): try: software.remove_package(ns, identity) removed.append(pkg_spec) - except errors.LmiFailed: - pass + except errors.LmiFailed as err: + LOG().warn('failed to remove "%s": %s', pkg_spec, err) return removed Software = command.register_subcommands( |