summaryrefslogtreecommitdiff
path: root/docker/utils/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/utils/utils.py')
-rw-r--r--docker/utils/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index b565732..10b9338 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -1001,6 +1001,9 @@ def format_environment(environment):
def format_env(key, value):
if value is None:
return key
+ if isinstance(value, six.binary_type):
+ value = value.decode('utf-8')
+
return u'{key}={value}'.format(key=key, value=value)
return [format_env(*var) for var in six.iteritems(environment)]