summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-25 15:22:19 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-25 15:22:19 +0000
commitd192f2fbdc64dfdcee4e55c89cf92bff43536032 (patch)
tree3df51275c7c5c820547c786de267ff12ff5c2ca1 /tools
parentbbad263baf8de680154437093e4e4ee988f8688a (diff)
downloadchromium_src-d192f2fbdc64dfdcee4e55c89cf92bff43536032.zip
chromium_src-d192f2fbdc64dfdcee4e55c89cf92bff43536032.tar.gz
chromium_src-d192f2fbdc64dfdcee4e55c89cf92bff43536032.tar.bz2
Trap WindowsError if a file is missing and convert it into MappingError.
This will print a better error message. R=csharp@chromium.org NOTRY=true BUG= Review URL: https://chromiumcodereview.appspot.com/10987020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/isolate/isolate.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/isolate/isolate.py b/tools/isolate/isolate.py
index de3a256..ed5f8ac 100755
--- a/tools/isolate/isolate.py
+++ b/tools/isolate/isolate.py
@@ -440,7 +440,11 @@ def process_input(filepath, prevdict, level, read_only):
# return out
if level >= STATS_ONLY:
- filestats = os.lstat(filepath)
+ try:
+ filestats = os.lstat(filepath)
+ except OSError:
+ # The file is not present.
+ raise run_test_from_archive.MappingError('%s is missing' % filepath)
is_link = stat.S_ISLNK(filestats.st_mode)
if get_flavor() != 'win':
# Ignore file mode on Windows since it's not really useful there.