diff options
author | Timothy Redaelli <tredaelli@redhat.com> | 2018-03-13 17:48:23 +0100 |
---|---|---|
committer | Russell Bryant <russell@ovn.org> | 2018-03-13 15:53:56 -0400 |
commit | fd405262c9de2a79eab817e4412d2cac19d0263a (patch) | |
tree | 055339f9a26c6fee2888ae88638943effab49b06 /utilities/ovs-pipegen.py | |
parent | 9e07b3f11e17f7b742d393f2ad923f36b80be1ea (diff) | |
download | openvswitch-fd405262c9de2a79eab817e4412d2cac19d0263a.tar.gz |
utilities: Make ovs-pipegen.py Python 3 friendly
Replace "print f" with "print(f)" and "xrange" with "range".
The changes are backward compatibile with Python 2.
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'utilities/ovs-pipegen.py')
-rwxr-xr-x | utilities/ovs-pipegen.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utilities/ovs-pipegen.py b/utilities/ovs-pipegen.py index 4bf240f3a..f040a7e1b 100755 --- a/utilities/ovs-pipegen.py +++ b/utilities/ovs-pipegen.py @@ -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(): |