Handle situations when no hardware info (sysinfo) is present.

This will occur when some tests are run with disable_sysinfo=True.

BUG=chromium-os:36177
TEST=remove sysinfo folders
     notice empty display
     apply patch
     notice full display of results

Change-Id: I03ea06345aa3faa5d3de938374b1ae2f2325598f
Reviewed-on: https://gerrit.chromium.org/gerrit/37946
Reviewed-by: Yusuf Mohsinally <mohsinally@google.com>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Ready: Mike Truty <truty@chromium.org>
Tested-by: Mike Truty <truty@chromium.org>
diff --git a/utils_py/local_dash/local_dash b/utils_py/local_dash/local_dash
index 418dfca..70f651d 100755
--- a/utils_py/local_dash/local_dash
+++ b/utils_py/local_dash/local_dash
@@ -17,6 +17,9 @@
 LOG = logging.getLogger('local_dash')
 
 
+UNKNOWN = 'unknown'
+
+
 class LocalDashException(StandardError):
   """Base exception class for this utility.
 
@@ -184,7 +187,7 @@
     self._results = []
 
     # A list of unique hardware used. Could be a board but is hwid at this time.
-    self._hardware_set = set()
+    self._hardware_set = set([UNKNOWN])
 
     # A list of unique tests discovered.
     self._test_set = set()
@@ -242,7 +245,7 @@
     Args:
       fields: A list of fields extracted from a csv line to be inspected.
     """
-    result_dict = {}
+    result_dict = {'dut': {'ec': UNKNOWN, 'bios': UNKNOWN, 'hwid': UNKNOWN}}
 
     path_, suite_path, is_suite = self._parse_path(fields)
     if not path_:
@@ -279,8 +282,7 @@
         if info_key == 'hwid':
           self._hardware_set.add(info_value)
         # Save all non-time-based useful keys under dut.
-        dut_dict = result_dict.setdefault('dut', {})
-        dut_dict[info_key] = info_value
+        result_dict['dut'][info_key] = info_value
     return result_dict
 
   def add_run_lines(self, dir_name, lines):