dev: let 'timeout' exception raised.

The stateful update process won't raise errors since rootfs update can be
adopted to continue auto-update. However, a timer is set for the whole
auto-update process in case that this process is hung. This timeout exception
may be caught by stateful update and won't be raised.

This CL is used to raise 'timeout' exception in auto-update, to make sure that
the auto-update process terminates itself when it meets the deadline.

BUG=chromium:633280
TEST=Locally ran 'ds.auto_update([dut], [image_path])';
Ran 'repair' for dut from local autotest instance;
Ran unittest, devserver_integration_test.

Changes to be committed:
       modified:   cros_update.py

Change-Id: Ib52cd9204b8152a83011a6b2f13fc16656fdb60c
Reviewed-on: https://chromium-review.googlesource.com/364622
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/cros_update.py b/cros_update.py
index 3239ce4..5920cbe 100644
--- a/cros_update.py
+++ b/cros_update.py
@@ -151,7 +151,8 @@
 
     The auto update includes 4 steps:
     1. if devserver cannot run, restore the stateful partition.
-    2. if possible, do stateful update first, but never raise errors.
+    2. if possible, do stateful update first, but never raise errors, except
+       for timeout_util.TimeoutError caused by system.signal.
     3. If required or stateful_update fails, first do rootfs update, then do
        stateful_update.
     4. Post-check for the whole update.
@@ -193,6 +194,8 @@
               self._StatefulUpdate(chromeos_AU)
               stateful_update_complete = True
 
+        except timeout_util.TimeoutError:
+          raise
         except Exception as e:
           logging.debug('Error happens in stateful update: %r', e)