Merge "Replace unicode with six.text_type"
This commit is contained in:
@@ -234,8 +234,8 @@ class DockerDriver(driver.ComputeDriver):
|
|||||||
self._stop_firewall(instance, network_info)
|
self._stop_firewall(instance, network_info)
|
||||||
|
|
||||||
def _encode_utf8(self, value):
|
def _encode_utf8(self, value):
|
||||||
if six.PY2 and not isinstance(value, unicode):
|
if six.PY2 and not isinstance(value, six.text_type):
|
||||||
value = unicode(value)
|
value = six.text_type(value)
|
||||||
return value.encode('utf-8')
|
return value.encode('utf-8')
|
||||||
|
|
||||||
def _find_container_by_instance(self, instance):
|
def _find_container_by_instance(self, instance):
|
||||||
|
|||||||
Reference in New Issue
Block a user