[moblab] More helpful error when RPC to fetch builds fails

BUG=chromium:666954
TEST=Local device. Used a fresh flash with no boto key installed
to prompt the error.

Change-Id: I4f6c080f1a31bc75a2a103e57303e76fd5994814
Reviewed-on: https://chromium-review.googlesource.com/909337
Commit-Ready: Matt Mallett <mattmallett@chromium.org>
Tested-by: Matt Mallett <mattmallett@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
(cherry picked from commit 8a97cf84d3bfa7bcd5a4a45af8c2dbabd61daed9)
Reviewed-on: https://chromium-review.googlesource.com/914856
Commit-Queue: Matt Mallett <mattmallett@chromium.org>
Trybot-Ready: Matt Mallett <mattmallett@chromium.org>
diff --git a/frontend/afe/moblab_rpc_interface.py b/frontend/afe/moblab_rpc_interface.py
index 2bc923b..14629b4 100644
--- a/frontend/afe/moblab_rpc_interface.py
+++ b/frontend/afe/moblab_rpc_interface.py
@@ -824,9 +824,16 @@
     """
     output = StringIO.StringIO()
     gs_image_location =_CONFIG.get_config_value('CROS', _IMAGE_STORAGE_SERVER)
-    utils.run(GsUtil.get_gsutil_cmd(),
-              args=('ls', gs_image_location + directory_name),
-              stdout_tee=output)
+    try:
+        utils.run(GsUtil.get_gsutil_cmd(),
+                  args=('ls', gs_image_location + directory_name),
+                  stdout_tee=output)
+    except error.CmdError as e:
+        error_text = ('Failed to list builds from %s.\n'
+                'Did you configure your boto key? Try running the config '
+                'wizard again.\n\n%s') % ((gs_image_location + directory_name),
+                    e.result_obj.stderr)
+        raise error.RPCException(error_text)
     lines = output.getvalue().split('\n')
     output.close()
     builds = [line.replace(gs_image_location,'').strip('/ ')