[oe-commits] org.oe.dev contrib/sanitize.py: Fix a hang when processing comment block and fix some
cyril.romain commit
openembedded-commits at lists.openembedded.org
Tue Sep 12 21:45:36 UTC 2006
contrib/sanitize.py: Fix a hang when processing comment block and fix some
erroneous for loop usage.
Author: cyril.romain at gmail.com
Branch: org.openembedded.dev
Revision: 22712c8613b8a7c9e5bd16bc8a75a2445ce7294c
ViewMTN: http://monotone.openembedded.org/revision.psp?id=22712c8613b8a7c9e5bd16bc8a75a2445ce7294c
Files:
1
contrib/sanitize.py
Diffs:
#
# mt diff -rff7ff7fa0d07d2c7292844eb04491298105f64bf -r22712c8613b8a7c9e5bd16bc8a75a2445ce7294c
#
#
#
# patch "contrib/sanitize.py"
# from [e29c73ba66dea5ea16e4c5918919a783ec7bc542]
# to [cf2924e23c02fc0fa3435fe5f8b19191c5c96d0a]
#
============================================================
--- contrib/sanitize.py e29c73ba66dea5ea16e4c5918919a783ec7bc542
+++ contrib/sanitize.py cf2924e23c02fc0fa3435fe5f8b19191c5c96d0a
@@ -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:
More information about the Openembedded-commits
mailing list