aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/per-site-settings.py
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2010-12-04 00:34:04 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-12-04 00:34:04 -0500
commit2092f4ff7a4fa5e3d689ec7f7bc09ba62603ab0e (patch)
tree0243c763b79070f07a94dfe65a2a992e459eb308 /examples/data/scripts/per-site-settings.py
parent23b855c0a182d5b965fe2d262180525dd50cd59a (diff)
Parse the line even if the indent is zero
Diffstat (limited to 'examples/data/scripts/per-site-settings.py')
-rwxr-xr-xexamples/data/scripts/per-site-settings.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/data/scripts/per-site-settings.py b/examples/data/scripts/per-site-settings.py
index 60e5b3a..26d047e 100755
--- a/examples/data/scripts/per-site-settings.py
+++ b/examples/data/scripts/per-site-settings.py
@@ -75,15 +75,16 @@ def grep_url(url, path, fin):
if cur_indent < indent:
state += 1
- # parse the line
- if state == 0:
- if not passing[0] and match_url(url, raw):
- passing[0] = True
- elif state == 1 and passing[0]:
- if not passing[1] and match_path(path, raw):
- passing[1] = True
- elif state == 2 and passing[1]:
- entries.append(raw)
+ # parse the line
+ if state == 0:
+ if not passing[0] and match_url(url, raw):
+ passing[0] = True
+ elif state == 1 and passing[0]:
+ if not passing[1] and match_path(path, raw):
+ passing[1] = True
+ elif state == 2 and passing[1]:
+ entries.append(raw)
+
cur_indent = indent
return entries