diff options
| author | Cliff Brake <cbrake@bec-systems.com> | 2012-12-14 18:38:34 +0000 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-12-18 17:35:18 +0100 |
| commit | 20ce63275033b54c33c25fa1c60de7c1a0dc816c (patch) | |
| tree | bc4c7be0c25b63cd206eb95585fb9a876161de8a /contrib | |
| parent | ee97efeec28cca615eb29b1e8ba73d3ccf29a57e (diff) | |
| download | meta-openembedded-20ce63275033b54c33c25fa1c60de7c1a0dc816c.tar.gz | |
update oe-stylize to be Python3 comaptible
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'contrib')
| -rwxr-xr-x | contrib/oe-stylize.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/oe-stylize.py b/contrib/oe-stylize.py index 07ed4f6e9f..712557d4f9 100755 --- a/contrib/oe-stylize.py +++ b/contrib/oe-stylize.py | |||
| @@ -306,10 +306,10 @@ def follow_rule(i, line): | |||
| 306 | # if the line still does not respect the rule | 306 | # if the line still does not respect the rule |
| 307 | if not rules[i][0](line): | 307 | if not rules[i][0](line): |
| 308 | # this is a rule disgression | 308 | # this is a rule disgression |
| 309 | print "## Disgression: ", rules[i][2], " in:", oldline | 309 | print ("## Disgression: ", rules[i][2], " in:", oldline) |
| 310 | else: | 310 | else: |
| 311 | # just remind user about his/her errors | 311 | # just remind user about his/her errors |
| 312 | print "## Reminder: ", rules[i][2], " in :", oldline | 312 | print ("## Reminder: ", rules[i][2], " in :", oldline) |
| 313 | return line | 313 | return line |
| 314 | 314 | ||
| 315 | 315 | ||
| @@ -363,7 +363,7 @@ if __name__ == "__main__": | |||
| 363 | commentBloc.append(line) | 363 | commentBloc.append(line) |
| 364 | continue | 364 | continue |
| 365 | 365 | ||
| 366 | if seen_vars.has_key(var): | 366 | if var in seen_vars: |
| 367 | for c in commentBloc: seen_vars[var].append(c) | 367 | for c in commentBloc: seen_vars[var].append(c) |
| 368 | commentBloc = [] | 368 | commentBloc = [] |
| 369 | seen_vars[var].append(line) | 369 | seen_vars[var].append(line) |
| @@ -381,7 +381,7 @@ if __name__ == "__main__": | |||
| 381 | line = follow_rule(5, line) | 381 | line = follow_rule(5, line) |
| 382 | if var == "": | 382 | if var == "": |
| 383 | if not in_routine: | 383 | if not in_routine: |
| 384 | print "## Warning: unknown variable/routine \"%s\"" % originalLine.rstrip('\n') | 384 | print ("## Warning: unknown variable/routine \"%s\"" % originalLine.rstrip('\n')) |
| 385 | var = 'others' | 385 | var = 'others' |
| 386 | for c in commentBloc: seen_vars[var].append(c) | 386 | for c in commentBloc: seen_vars[var].append(c) |
| 387 | commentBloc = [] | 387 | commentBloc = [] |
| @@ -402,5 +402,5 @@ if __name__ == "__main__": | |||
| 402 | for l in seen_vars[k]: | 402 | for l in seen_vars[k]: |
| 403 | olines.append(l) | 403 | olines.append(l) |
| 404 | previourVarPrefix = k.split('_')[0]=='' and "unknown" or k.split('_')[0] | 404 | previourVarPrefix = k.split('_')[0]=='' and "unknown" or k.split('_')[0] |
| 405 | for line in olines: print line | 405 | for line in olines: print(line) |
| 406 | 406 | ||
