Fix the verify_components tool for gooftool.

BUG=chrome-os-partner:13101
TEST=tested in local ZGB test device

Change-Id: Ia3f9bfb35d3d4dc3428a7611e678f1c7f394ed95
Reviewed-on: https://gerrit.chromium.org/gerrit/31329
Tested-by: Andy Cheng <andycheng@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Andy Cheng <andycheng@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index baaa91e..d1776d8 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -336,9 +336,9 @@
   comp_db = hwid_tool.HardwareDb(options.hwdb_path).comp_db
   if not options.target_comps:
     sys.exit('ERROR: no target component classes specified; possible choices:\n'
-             + '\n  '.join(sorted(comp_db.components)))
+             + '\n  '.join(sorted(comp_db.probeable_components)))
   for comp_class in options.target_comps:
-    if comp_class not in comp_db.components:
+    if comp_class not in comp_db.probeable_components:
       sys.exit('ERROR: specified component class %r does not exist'
                ' in the component DB.' % comp_class)
   probe_results = Probe(target_comp_classes=options.target_comps,
@@ -346,7 +346,7 @@
   errors = []
   matches = []
   for comp_class in sorted(options.target_comps):
-    probe_val = probe_results.found_components.get(comp_class, None)
+    probe_val = probe_results.found_probe_value_map.get(comp_class, None)
     if probe_val is not None:
       comp_name = comp_db.result_name_map.get(probe_val, None)
       if comp_name is not None:
@@ -357,12 +357,14 @@
                       (comp_class, probe_val))
     else:
       errors.append('missing %r component' % comp_class)
+  if matches:
+    print 'found probeable components:\n  %s' % '\n  '.join(matches)
+
   if errors:
-    print '\n'.join(errors)
-    sys.exit('component verification FAILURE')
+    print '\nerrors:\n  %s' % '\n  '.join(errors)
+    sys.exit('\ncomponent verification FAILURE')
   else:
-    print 'component verification SUCCESS'
-    print 'found components:\n  %s' % '\n  '.join(matches)
+    print "\ncomponent verification SUCCESS"
 
 
 @Command('verify_hwid',