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

GitHub noreply at github.com
Fri Aug 18 20:14:22 UTC 2017


  Branch: refs/heads/branch-2.8
  Home:   https://github.com/openvswitch/ovs
  Commit: a358079fb1ebe1c4117c3eab6bfd432c273ad718
      https://github.com/openvswitch/ovs/commit/a358079fb1ebe1c4117c3eab6bfd432c273ad718
  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: dc82e5e8c72309de0ec40d7acf10b641bba82c56
      https://github.com/openvswitch/ovs/commit/dc82e5e8c72309de0ec40d7acf10b641bba82c56
  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/0f9e37059449...dc82e5e8c723


More information about the git mailing list