summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 21:51:01 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 21:51:01 +0000
commitf28fb3fe35e3ccf5f3f09e52497723830c209093 (patch)
treec31312a28c52c3b45397420793fb7f7d50a2263b /native_client_sdk
parent3a1625d1d4e7d292c29e4f16bde8918253ed78a1 (diff)
downloadchromium_src-f28fb3fe35e3ccf5f3f09e52497723830c209093.zip
chromium_src-f28fb3fe35e3ccf5f3f09e52497723830c209093.tar.gz
chromium_src-f28fb3fe35e3ccf5f3f09e52497723830c209093.tar.bz2
[NaCl SDK] In update_nacl_manifest.py, catch errors from "gsutil ls".
The behavior in gsutil 3.10 is different from 3.3. gsutil ls of a non-existent directory used to return nothing, now it throws an exception. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10580017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143059 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/build_tools/update_nacl_manifest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/native_client_sdk/src/build_tools/update_nacl_manifest.py b/native_client_sdk/src/build_tools/update_nacl_manifest.py
index c2078c5..0c76e75 100755
--- a/native_client_sdk/src/build_tools/update_nacl_manifest.py
+++ b/native_client_sdk/src/build_tools/update_nacl_manifest.py
@@ -184,7 +184,10 @@ class RealDelegate(Delegate):
def GsUtil_ls(self, url):
"""See Delegate.GsUtil_ls"""
- stdout = self._RunGsUtil(None, 'ls', url)
+ try:
+ stdout = self._RunGsUtil(None, 'ls', url)
+ except subprocess.CalledProcessError:
+ return []
# filter out empty lines
return filter(None, stdout.split('\n'))
@@ -216,7 +219,8 @@ class RealDelegate(Delegate):
else:
stdin_pipe = None
- process = subprocess.Popen(cmd, stdin=stdin_pipe, stdout=subprocess.PIPE)
+ process = subprocess.Popen(cmd, stdin=stdin_pipe, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
stdout, _ = process.communicate(stdin)
if process.returncode != 0: