devserver: Check whether devserver can run before rootfs update.

BUG=chromium:718532
TEST=Test locally: provision a DUT with old version of ChromeOS.

Change-Id: I3a7833ab2f81246015f8e228fd6de16509b93fa3
Reviewed-on: https://chromium-review.googlesource.com/500048
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/cros_update.py b/cros_update.py
index 5645458..c518ccc 100644
--- a/cros_update.py
+++ b/cros_update.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
+# Copyright 2016 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
@@ -155,6 +155,8 @@
     Args:
       cros_updater: The CrOS auto updater for auto-update.
     """
+    self._WriteAUStatus('Check whether devserver can run before rootfs update')
+    cros_updater.CheckDevserverRun()
     self._WriteAUStatus('transfer rootfs update package')
     cros_updater.TransferRootfsUpdate()
     self._WriteAUStatus('pre-setup rootfs update')
diff --git a/devserver.py b/devserver.py
index 5e6cc0f..fec5001 100755
--- a/devserver.py
+++ b/devserver.py
@@ -97,10 +97,14 @@
 # devserver on host.
 try:
   import cros_update
-  import cros_update_progress
 except ImportError as e:
   _Log('cros_update cannot be imported: %r', e)
   cros_update = None
+
+try:
+  import cros_update_progress
+except ImportError as e:
+  _Log('cros_update_progress cannot be imported: %r', e)
   cros_update_progress = None
 
 # only import setup_chromite before chromite import.