[ovs-git] [openvswitch/ovs] c57e02: ovs-bugtool: Fix Python3 bytes str issue.

William Tu noreply at github.com
Tue Jul 14 23:39:28 UTC 2020

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c57e02cfd7978368dd90bba52cd20f75934ed8ed
  Author: William Tu <u9012063 at gmail.com>
  Date:   2020-07-14 (Tue, 14 Jul 2020)

  Changed paths:
    M utilities/bugtool/ovs-bugtool.in

  Log Message:
  ovs-bugtool: Fix Python3 bytes str issue.

The patch fixes two errors due to type mismatched, when converting
between str and bytes:
  File "/usr/local/sbin/ovs-bugtool", line 649, in main
    cmd_output(CAP_NETWORK_STATUS, [OVS_DPCTL, 'dump-flows', '-m', d])
  File "/usr/local/sbin/ovs-bugtool", line 278, in cmd_output
    label = ' '.join(a)
TypeError: sequence item 3: expected str instance, bytes found

  File "/usr/sbin/ovs-bugtool", line 721, in main
  File "/usr/sbin/ovs-bugtool", line 366, in collect_data
  File "/usr/sbin/ovs-bugtool", line 1354, in run_procs
    p.inst.write("\n** timeout **\n")
  File "/usr/sbin/ovs-bugtool", line 1403, in write
    BytesIO.write(self, s)
TypeError: a bytes-like object is required, not 'str'

VMware-BZ: #2602135
Fixed: 9e6c00bca9af ("bugtool: Fix for Python3.")
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
Signed-off-by: William Tu <u9012063 at gmail.com>

More information about the git mailing list