Message ID | 1463435819-20238-2-git-send-email-joe@ovn.org |
---|---|
State | Accepted |
Headers | show |
On Mon, May 16, 2016 at 5:56 PM, Joe Stringer <joe@ovn.org> wrote: > Adapt to python-2.6+, including support for 3. > > Signed-off-by: Joe Stringer <joe@ovn.org> > Acked-by: Russell Bryant <russell@ovn.org>
On 28 July 2016 at 11:02, Russell Bryant <russell@ovn.org> wrote: > > > On Mon, May 16, 2016 at 5:56 PM, Joe Stringer <joe@ovn.org> wrote: >> >> Adapt to python-2.6+, including support for 3. >> >> Signed-off-by: Joe Stringer <joe@ovn.org> > > > Acked-by: Russell Bryant <russell@ovn.org> Thanks for the review, it looks like this has already been pushed but it's good to see it was in good shape ;) If you are currently having some issue with ovs-dev.py and python3 on a recent master then maybe this patch didn't cover that, so I suggest you follow up with another patch to fix it.
On Thu, Jul 28, 2016 at 2:11 PM, Joe Stringer <joe@ovn.org> wrote: > On 28 July 2016 at 11:02, Russell Bryant <russell@ovn.org> wrote: > > > > > > On Mon, May 16, 2016 at 5:56 PM, Joe Stringer <joe@ovn.org> wrote: > >> > >> Adapt to python-2.6+, including support for 3. > >> > >> Signed-off-by: Joe Stringer <joe@ovn.org> > > > > > > Acked-by: Russell Bryant <russell@ovn.org> > > Thanks for the review, it looks like this has already been pushed but > it's good to see it was in good shape ;) > > If you are currently having some issue with ovs-dev.py and python3 on > a recent master then maybe this patch didn't cover that, so I suggest > you follow up with another patch to fix it. > Ha, sorry. I don't actually use this. It looked like a new unreviewed patch in my email client. I had done a search for "2.6" looking for a mail talking about OVS 2.6 plans and then didn't clear the search. The commit message talks about Python 2.6. I wasn't paying any attention to dates and the mail caught my eye as an easy quick review. Oops. :-)
diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 0ba4280a8ddf..40cd43e14730 100755 --- a/utilities/ovs-dev.py +++ b/utilities/ovs-dev.py @@ -54,7 +54,7 @@ def _sh(*args, **kwargs): def uname(): - return _sh("uname", "-r", capture=True)[0].strip() + return _sh("uname", "-r", capture=True)[0].decode().strip() def sudo(): @@ -296,13 +296,13 @@ def modinst(): sudo() try: _sh("rmmod", "openvswitch") - except subprocess.CalledProcessError, e: + except subprocess.CalledProcessError as e: pass # Module isn't loaded try: _sh("rm -f /lib/modules/%s/extra/openvswitch.ko" % uname()) _sh("rm -f /lib/modules/%s/extra/vport-*.ko" % uname()) - except subprocess.CalledProcessError, e: + except subprocess.CalledProcessError as e: pass # Module isn't installed conf() @@ -409,7 +409,7 @@ def main(): parser.add_option_group(group) group = optparse.OptionGroup(parser, "Optimization Flags") - for i in ["s", "g"] + range(4) + ["fast"]: + for i in ["s", "g"] + list(range(4)) + ["fast"]: group.add_option("--O%s" % str(i), dest="optimize", action="store_const", const=i, help="compile with -O%s" % str(i))
Adapt to python-2.6+, including support for 3. Signed-off-by: Joe Stringer <joe@ovn.org> --- utilities/ovs-dev.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)