From 8aba5f73057d4f48660c67c15249138877fa6c3b Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 16 Sep 2010 19:48:59 +0000 Subject: [PATCH] Add a nice message for cygwin users, telling them to rebase when necessary. BUG=53483 TEST=none Review URL: http://codereview.chromium.org/3435010 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@59699 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gclient_utils.py b/gclient_utils.py index 4c8edb6bf..a74c6b960 100644 --- a/gclient_utils.py +++ b/gclient_utils.py @@ -73,7 +73,15 @@ def Popen(args, **kwargs): # executable, but shell=True makes subprocess on Linux fail when it's called # with a list because it only tries to execute the first item in the list. kwargs['shell'] = (sys.platform=='win32') - return subprocess.Popen(args, **kwargs) + try: + return subprocess.Popen(args, **kwargs) + except OSError, e: + if e.errno == errno.EAGAIN and sys.platform == 'cygwin': + raise Error( + 'Visit ' + 'http://code.google.com/p/chromium/wiki/CygwinDllRemappingFailure to ' + 'learn how to fix this error; you need to rebase your cygwin dlls') + raise def CheckCall(command, cwd=None, print_error=True):