Skip to content

Commit

Permalink
utilities: Make ovs-pipegen.py Python 3 friendly
Browse files Browse the repository at this point in the history
Replace "print f" with "print(f)" and "xrange" with "range".

The changes are backward compatibile with Python 2.

Signed-off-by: Timothy Redaelli <[email protected]>
Signed-off-by: Russell Bryant <[email protected]>
  • Loading branch information
drizzt authored and russellb committed Mar 13, 2018
1 parent 9e07b3f commit fd40526
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utilities/ovs-pipegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def pipeline(size):
pipeline = [l2, l3, l4, l2]

flows = []
for stage in xrange(len(pipeline)):
for stage in range(len(pipeline)):
action = resubmit(stage + 1)
flows += [pipeline[stage](stage, action) for _ in xrange(size)]
flows += [pipeline[stage](stage, action) for _ in range(size)]
flows.append(flow_str(stage, "", action, priority=1))

flows.append(flow_str(len(pipeline), "", "in_port"))

for f in flows:
print f
print(f)


def main():
Expand Down

0 comments on commit fd40526

Please sign in to comment.