[autotest] Bug fix on how lock is counted in host history.

The logic to count lock status in host history was not correct. This CL changes
the behavior to only apply lock to Ready status, since statuses other than
`Repair Failed` and Repairing indicate a dut is working on something, and
a dut with status of `Repair Failed` and Repairing is not 'available' any way.

BUG=None
TEST=unittest, run against a dut in lab
./host_history.py --hosts chromeos2-row4-rack6-host7 -l 24  -v

Change-Id: I513210f1d106fdd70214aa58330e0beed3c43f23
Reviewed-on: https://chromium-review.googlesource.com/229432
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
2 files changed