summaryrefslogtreecommitdiffstats
path: root/commands/software/lmi/scripts/software/cmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'commands/software/lmi/scripts/software/cmd.py')
-rw-r--r--commands/software/lmi/scripts/software/cmd.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/commands/software/lmi/scripts/software/cmd.py b/commands/software/lmi/scripts/software/cmd.py
index c3ec888..a3f4792 100644
--- a/commands/software/lmi/scripts/software/cmd.py
+++ b/commands/software/lmi/scripts/software/cmd.py
@@ -330,21 +330,24 @@ class Verify(command.LmiLister):
COLUMNS = []
def execute(self, ns, package_array):
- failed_identity_checks = []
+ identity_checks = []
def _verify_identity(identity):
failed_checks = list(software.verify_package(ns, identity))
+ identity_checks.append((identity, failed_checks))
+
+ for_each_package_specs(ns, package_array, 'verify', _verify_identity)
+ for identity, failed_checks in identity_checks:
if len(failed_checks):
- failed_identity_checks.append((identity, failed_checks))
+ yield fcmd.NewTableCommand(title=identity.ElementName)
+ for file_check in failed_checks:
+ yield ( software.render_failed_flags(file_check.FailedFlags)
+ , file_check.Name)
+ elif self.app.config.verbose:
+ yield fcmd.NewTableCommand(title=identity.ElementName)
+ yield ('', 'passed')
else:
LOG().debug('Package "%s" passed.', identity.ElementName)
- for_each_package_specs(ns, package_array, 'verify', _verify_identity)
- for identity, checks in failed_identity_checks:
- yield fcmd.NewTableCommand(title=identity.ElementName)
- for file_check in checks:
- yield ( software.render_failed_flags(file_check.FailedFlags)
- , file_check.Name)
-
class ChangeEnabledState(command.LmiCheckResult):
"""
Class for 'enable' and 'disable' commands. This particular class allows