Raise error when servo fails to open/close the lid

Fail the test when opening/closing lid fails. Otherwise, it would
take more time to diagnose the problem when the error propagates to a
later stage (https://chromium-review.googlesource.com/#/c/269615/).

BUG=none
TEST=run display_LidCloseOpen on daisy

Change-Id: Ifca5d76f565502889a02dccc8cc0ed7ea94f0fb2
Reviewed-on: https://chromium-review.googlesource.com/270576
Reviewed-by: Tom Tam <waihong@google.com>
Tested-by: Yuli Huang <yuli@chromium.org>
Commit-Queue: Yuli Huang <yuli@chromium.org>
diff --git a/server/cros/servo/servo.py b/server/cros/servo/servo.py
index 6159a95..5a71bbb 100644
--- a/server/cros/servo/servo.py
+++ b/server/cros/servo/servo.py
@@ -255,16 +255,16 @@
 
 
     def lid_open(self):
-        """Simulate opening the lid."""
-        self.set_nocheck('lid_open', 'yes')
+        """Simulate opening the lid and raise exception if all attempts fail"""
+        self.set('lid_open', 'yes')
 
 
     def lid_close(self):
-        """Simulate closing the lid.
+        """Simulate closing the lid and raise exception if all attempts fail
 
         Waits 6 seconds to ensure the device is fully asleep before returning.
         """
-        self.set_nocheck('lid_open', 'no')
+        self.set('lid_open', 'no')
         time.sleep(Servo.SLEEP_DELAY)