Chromium Code Reviews| Index: owners.py |
| diff --git a/owners.py b/owners.py |
| index 1dd467f6ff7d7cf30a880a45fc9a661f43ec435c..109273e5c8ac355b03833af61e3a1cfbaa16ad79 100644 |
| --- a/owners.py |
| +++ b/owners.py |
| @@ -14,7 +14,7 @@ The syntax of the OWNERS file is, roughly: |
| lines := (\s* line? \s* "\n")* |
| line := directive |
| - | "per-file" \s+ glob "=" directive |
| + | "per-file" \s+ glob \s* "=" \s* directive |
| | comment |
| directive := "set noparent" |
| @@ -221,8 +221,8 @@ class Database(object): |
| m = re.match("per-file (.+)=(.+)", line) |
|
M-A Ruel
2012/11/30 18:37:31
why not
re.match(r"per-file\s+(.+)\s*=\s*(.+)\s*",
|
| if m: |
| - glob_string = m.group(1) |
| - directive = m.group(2) |
| + glob_string = m.group(1).strip() |
| + directive = m.group(2).strip() |
| full_glob_string = self.os_path.join(self.root, dirpath, glob_string) |
| if '/' in glob_string or '\\' in glob_string: |
| raise SyntaxErrorInOwnersFile(owners_path, lineno, |