def _FindSerialNumber(self):
    for item in self._GetDataTypeItems('hardware'):
      if 'serial_number' in item:
        self._profile['serial_number'] = item['serial_number']
        return
Test empty files don't raise errors.
dataset/ETHPy150Open google/simian/src/simian/mac/common/hw.py/SystemProfile._FindSerialNumber--crossover with--dataset/ETHPy150Open google/grr/grr/parsers/ie_history_test.py/IEHistoryTest.testErrors