Index: tools/isolate/trace_inputs.py |
diff --git a/tools/isolate/trace_inputs.py b/tools/isolate/trace_inputs.py |
index c8c0c537418d15a0336cc9fb6c50c10712ca50dc..e74b2a12c38a8d999737024e1fd62a2052cfde5a 100755 |
--- a/tools/isolate/trace_inputs.py |
+++ b/tools/isolate/trace_inputs.py |
@@ -714,7 +714,7 @@ class Dtrace(object): |
# Arguments parsing. |
RE_CHDIR = re.compile(r'^\"(.+?)\"$') |
- RE_OPEN = re.compile(r'^\"(.+?)\", (\d+), (\d+)$') |
+ RE_OPEN = re.compile(r'^\"(.+?)\", (\d+), (-?\d+)$') |
RE_RENAME = re.compile(r'^\"(.+?)\", \"(.+?)\"$') |
O_DIRECTORY = 0x100000 |
@@ -776,8 +776,10 @@ class Dtrace(object): |
def handle_open_nocancel(self, ppid, pid, function, args, result): |
return self.handle_open(ppid, pid, function, args, result) |
- def handle_open(self, _ppid, pid, _function, args, result): |
- args = self.RE_OPEN.match(args).groups() |
+ def handle_open(self, _ppid, pid, function, args, result): |
+ match = self.RE_OPEN.match(args) |
+ assert match, (pid, function, args, result) |
+ args = match.groups() |
flag = int(args[1]) |
if self.O_DIRECTORY & flag == self.O_DIRECTORY: |
# Ignore directories. |