[ovs-git] [openvswitch/ovs] 227abb: ovs-tcpundump: Fix incompatibilities with python3

GitHub noreply at github.com
Tue Jul 24 23:01:34 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 227abb77d3d1cf0252af6e78b0a2988b94318a02
      https://github.com/openvswitch/ovs/commit/227abb77d3d1cf0252af6e78b0a2988b94318a02
  Author: Timothy Redaelli <tredaelli at redhat.com>
  Date:   2018-07-24 (Tue, 24 Jul 2018)

  Changed paths:
    M utilities/ovs-tcpundump.in

  Log Message:
  -----------
  ovs-tcpundump: Fix incompatibilities with python3

Added parenthesis after print and use "as" instead of "," in except.

This commit fixes also a couple of flake8 warnings:

    utilities/ovs-tcpundump:23:1: E302 expected 2 blank lines, found 1
    utilities/ovs-tcpundump:35:1: E305 expected 2 blank lines after class or
    function definition, found 1

Tested on Python 2.7.15 and Python 3.6.5

Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 793bdb6c050081967160874e0d0bfa6480ba232a
      https://github.com/openvswitch/ovs/commit/793bdb6c050081967160874e0d0bfa6480ba232a
  Author: Timothy Redaelli <tredaelli at redhat.com>
  Date:   2018-07-24 (Tue, 24 Jul 2018)

  Changed paths:
    M utilities/ovs-tcpdump.in

  Log Message:
  -----------
  ovs-tcpdump: Fix incompatibilities with python3

Opening a file with 'rw' in Python3 returns an error, moreover using 'rw' in
Python2 is wrong too since it opens the file using O_RDONLY and not by using
O_RDWR.

This commit fixes it by using the low-level os.open function with O_RDWR
as suggested by the Linux kernel (tuntap.txt) documentation.

This commit fixes also some usual bytes vs string incompatibilities.

Tested on Python 2.7.15 and Python 3.6.5

Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/7a2ce387d817...793bdb6c0500
      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list