summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCyril Romain <cyril.romain@gmail.com>2006-09-12 21:40:28 +0000
committerJamie Lenehan <lenehan@twibble.org>2006-09-12 21:40:28 +0000
commitd17f585bc4004549b4c3d45b3d7d8613c3f0a6a0 (patch)
tree32b3f4906260b49a27d7f3948ad306140cb015aa /contrib
parent2f58bb1398ec45127536ade3ea969ac77fda8318 (diff)
contrib/sanitize.py: Fix a hang when processing comment block and fix some
erroneous for loop usage.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/sanitize.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/contrib/sanitize.py b/contrib/sanitize.py
index 028b2cc535..41264a56e3 100755
--- a/contrib/sanitize.py
+++ b/contrib/sanitize.py
@@ -362,9 +362,8 @@ if __name__ == "__main__":
continue
if seen_vars.has_key(var):
- for c in commentBloc:
- seen_vars[var].append(c)
- commentBloc = []
+ for c in commentBloc: seen_vars[var].append(c)
+ commentBloc = []
seen_vars[var].append(line)
else:
for k in OE_vars:
@@ -382,17 +381,15 @@ if __name__ == "__main__":
if not in_routine:
print "## Warning: unknown variable/routine \"%s\"" % originalLine
var = 'others'
- for c in commentBloc:
- seen_vars[var].append(c)
- commentBloc = []
+ for c in commentBloc: seen_vars[var].append(c)
+ commentBloc = []
seen_vars[var].append(line)
if not keep and not in_routine: var = ""
# -- dump the sanitized .bb file --
addEmptyLine = False
# write comments that are not related to variables nor routines
- for l in olines:
- olines.append(l)
+ for l in commentBloc: olines.append(l)
# write variables and routines
previourVarPrefix = "unknown"
for k in OE_vars: