Browse Source

Fix unicode error - python2

If the name of a container doesn't exist and its name isn't utf-8 encoded you receive a stacktrace

Signed-off-by: Thomas <[email protected]>
Thomas 7 years ago
parent
commit
a7ed1dcbf6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compose/project.py

+ 1 - 1
compose/project.py

@@ -703,7 +703,7 @@ def warn_for_swarm_mode(client):
 
 class NoSuchService(Exception):
     def __init__(self, name):
-        self.name = name
+        self.name = name.decode('utf8')
         self.msg = "No such service: %s" % self.name
 
     def __str__(self):