Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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>
  • Loading branch information...
commit 20ce63275033b54c33c25fa1c60de7c1a0dc816c 1 parent ee97efe
@cbrake cbrake authored shr-project committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 contrib/oe-stylize.py
View
10 contrib/oe-stylize.py
@@ -306,10 +306,10 @@ def follow_rule(i, line):
# if the line still does not respect the rule
if not rules[i][0](line):
# this is a rule disgression
- print "## Disgression: ", rules[i][2], " in:", oldline
+ print ("## Disgression: ", rules[i][2], " in:", oldline)
else:
# just remind user about his/her errors
- print "## Reminder: ", rules[i][2], " in :", oldline
+ print ("## Reminder: ", rules[i][2], " in :", oldline)
return line
@@ -363,7 +363,7 @@ def follow_rule(i, line):
commentBloc.append(line)
continue
- if seen_vars.has_key(var):
+ if var in seen_vars:
for c in commentBloc: seen_vars[var].append(c)
commentBloc = []
seen_vars[var].append(line)
@@ -381,7 +381,7 @@ def follow_rule(i, line):
line = follow_rule(5, line)
if var == "":
if not in_routine:
- print "## Warning: unknown variable/routine \"%s\"" % originalLine.rstrip('\n')
+ print ("## Warning: unknown variable/routine \"%s\"" % originalLine.rstrip('\n'))
var = 'others'
for c in commentBloc: seen_vars[var].append(c)
commentBloc = []
@@ -402,5 +402,5 @@ def follow_rule(i, line):
for l in seen_vars[k]:
olines.append(l)
previourVarPrefix = k.split('_')[0]=='' and "unknown" or k.split('_')[0]
- for line in olines: print line
+ for line in olines: print(line)
Please sign in to comment.
Something went wrong with that request. Please try again.