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 <thomas@9bitbyte.com>
This commit is contained in:
Thomas 2018-01-13 06:48:16 +11:00
parent 9aa9758819
commit a7ed1dcbf6
1 changed files with 1 additions and 1 deletions

View File

@ -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):