Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: tools/isolate/trace_inputs.py

Issue 10221022: Fix case where an unmounted partition is accessed during tracing on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/trace_inputs.py
diff --git a/tools/isolate/trace_inputs.py b/tools/isolate/trace_inputs.py
index 6cb6dc81651be3fc79f118717e7134cf44fcf233..ad7fe411f0a9c1d5d11fab940d558c583cdc5d4a 100755
--- a/tools/isolate/trace_inputs.py
+++ b/tools/isolate/trace_inputs.py
@@ -134,7 +134,10 @@ if sys.platform == 'win32':
"""Converts a native NT path to DOS path."""
m = re.match(r'(^\\Device\\[a-zA-Z0-9]+)(\\.*)?$', path)
assert m, path
- assert m.group(1) in self._MAPPING, (path, self._MAPPING)
+ if not m.group(1) in self._MAPPING:
+ # Unmapped partitions may be accessed by windows for the
+ # fun of it while the test is running. Discard these.
+ return None
drive = self._MAPPING[m.group(1)]
if not drive or not m.group(2):
return drive
@@ -957,7 +960,8 @@ class LogmanTrace(object):
Interestingly enough, the file is always with an absolute path.
"""
- if (self.blacklist(filename) or
+ if (not filename or
+ self.blacklist(filename) or
os.path.isdir(filename) or
filename in self.files or
filename in self.non_existent):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698