Browse Source

String to byte conversion should provide the encoding type

Note:
In Train we still need to support Python 2.7 so this commit
adds import of six and six is used to make correct convertion
to bytes in both Python 2.7 and Python 3.

Change-Id: Id988cab87d32d5721cd91152df194fbb6fa703c5
Closes-Bug: #1887385
(cherry picked from commit 7a56b8f3bc)
(cherry picked from commit 18f019984a)
(cherry picked from commit 0090884e15)
changes/74/749374/1
Rodolfo Alonso Hernandez 1 year ago
committed by Dan Radez
parent
commit
0b1fd4fc26
  1. 3
      neutron/tests/functional/test_server.py

3
neutron/tests/functional/test_server.py

@ -24,6 +24,7 @@ import mock
from neutron_lib import worker as neutron_worker
from oslo_config import cfg
import psutil
import six
from neutron.common import utils
from neutron import manager
@ -221,7 +222,7 @@ class TestWsgiServer(TestNeutronServer):
# Memorize a port that was chosen for the service
self.port = server.port
os.write(self.pipeout, bytes(self.port))
os.write(self.pipeout, six.b(str(self.port)))
server.wait()

Loading…
Cancel
Save