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:33:24 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-12-04 00:33:24 -0500
commit23b855c0a182d5b965fe2d262180525dd50cd59a (patch)
tree7d293f019230563078f2ef03291f6f580bb658c3 /examples/data/scripts/per-site-settings.py
parentb8b5e56ba3a764cb162160bc5a326acfdb5ad6e6 (diff)
Strip the line properly
Diffstat (limited to 'examples/data/scripts/per-site-settings.py')
-rwxr-xr-xexamples/data/scripts/per-site-settings.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/data/scripts/per-site-settings.py b/examples/data/scripts/per-site-settings.py
index 6503a00..60e5b3a 100755
--- a/examples/data/scripts/per-site-settings.py
+++ b/examples/data/scripts/per-site-settings.py
@@ -55,8 +55,9 @@ def grep_url(url, path, fin):
# 2 == command
state = 0
for line in fin:
- raw = line.lstrip()
- indent = len(line) - len(raw)
+ raw = line.strip()
+
+ indent = len(line) - len(raw) - 1
if not indent:
# Reset state
passing = [False, False]