First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError.

Make sure every site that catches gclient_utils.Error also catch
subprocess2.CalledProcessError.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6691034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80339 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index e63f85a..9a67822 100644
--- a/gclient.py
+++ b/gclient.py
@@ -68,6 +68,7 @@
 import gclient_scm
 import gclient_utils
 from third_party.repo.progress import Progress
+import subprocess2
 
 
 def attr(attribute, data):
@@ -453,7 +454,7 @@
     try:
       gclient_utils.CheckCallAndFilterAndHeader(
           command, cwd=self.root_dir(), always=True)
-    except gclient_utils.Error, e:
+    except (gclient_utils.Error, subprocess2.CalledProcessError), e:
       # Use a discrete exit status code of 2 to indicate that a hook action
       # failed.  Users of this script may wish to treat hook action failures
       # differently from VC failures.
@@ -1261,7 +1262,7 @@
     # Not a known command. Default to help.
     GenUsage(parser, 'help')
     return CMDhelp(parser, argv)
-  except gclient_utils.Error, e:
+  except (gclient_utils.Error, subprocess2.CalledProcessError), e:
     print >> sys.stderr, 'Error: %s' % str(e)
     return 1