allow spaces on the per-file directives in OWNERS files
R=maruel@chromium.org
BUG=163030
Review URL: https://chromiumcodereview.appspot.com/11434048
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@170819 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/owners.py b/owners.py
index 1dd467f..109273e 100644
--- a/owners.py
+++ b/owners.py
@@ -14,7 +14,7 @@
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 @@
m = re.match("per-file (.+)=(.+)", line)
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,