From f32e8a833770bb767fa5d31fce6a3e7755ca6806 Mon Sep 17 00:00:00 2001 From: "skylined@chromium.org" Date: Mon, 8 Jun 2009 14:04:54 +0000 Subject: [PATCH] Check if the given root path argument points to a valid directory. Display an error message and quit if it is not. Review URL: http://codereview.chromium.org/118379 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@17856 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome-update.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome-update.py b/chrome-update.py index dc19e4d33..639823054 100755 --- a/chrome-update.py +++ b/chrome-update.py @@ -144,6 +144,9 @@ def Main(): sys.exit(1) chrome_root = args[0] + if not os.path.isdir(chrome_root): + Message("Path to chrome root (%s) not found." % repr(chrome_root)) + sys.exit(1) if not options.nosync: rv = DoUpdate(chrome_root)