hwid: Patch YAML mapping constructor to fail on duplicated keys.

The default PyYAML's mapping constructor does not warn nor raise
exception when there are duplicated keys in a mapping.

BUG=chrome-os-partner:37618
TEST=unit tests

Change-Id: I7d603eca6b77a485657d4e757146d553c6eaf947
Signed-off-by: Ricky Liang <jcliang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/275870
3 files changed