[ovs-git] [openvswitch/ovs] e2c706: python: fix python3 encode/decode on Windows

GitHub noreply at github.com
Fri Aug 18 20:16:28 UTC 2017


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: e2c7064ca79617ae21f4621f1c9f1c78daaff84b
      https://github.com/openvswitch/ovs/commit/e2c7064ca79617ae21f4621f1c9f1c78daaff84b
  Author: Alin Balutoiu <abalutoiu at cloudbasesolutions.com>
  Date:   2017-08-18 (Fri, 18 Aug 2017)

  Changed paths:
    M python/ovs/stream.py
    M python/ovs/winutils.py

  Log Message:
  -----------
  python: fix python3 encode/decode on Windows

Fix double encoding/decoding on data, caused by
'get_decoded_buffer' and 'get_encoded_buffer'.

The functions 'get_decoded_buffer' and 'get_encoded_buffer'
from winutils have been removed. They are no longer
necessary since the buffers received/returned are already
in the right form.

The necessary encoding has been moved before any sending
function (this also includes named pipes send on Windows).

Co-authored-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Alin Balutoiu <abalutoiu at cloudbasesolutions.com>
Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Acked-by: Lance Richardson <lrichard at redhat.com>
Signed-off-by: Russell Bryant <russell at ovn.org>


  Commit: 294db1739a3be6da34e79dbf55c2c720fd56ca60
      https://github.com/openvswitch/ovs/commit/294db1739a3be6da34e79dbf55c2c720fd56ca60
  Author: Alin Balutoiu <abalutoiu at cloudbasesolutions.com>
  Date:   2017-08-18 (Fri, 18 Aug 2017)

  Changed paths:
    M tests/test-ovsdb.py

  Log Message:
  -----------
  python: Force file system encoding on cmdline args

On Windows, the default file system encoding is 'mbcs'
resulting in a bad conversion.

To make it cross-platform tolerant use
'sys.getfilesystemencoding()' instead of 'utf-8'.

Co-authored-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Alin Balutoiu <abalutoiu at cloudbasesolutions.com>
Signed-off-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Acked-by: Lance Richardson <lrichard at redhat.com>
Signed-off-by: Russell Bryant <russell at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/79e717836cdb...294db1739a3b


More information about the git mailing list