diff --git a/docker/models/containers.py b/docker/models/containers.py index 9c9e92c90f..a61e32ddba 100644 --- a/docker/models/containers.py +++ b/docker/models/containers.py @@ -30,8 +30,7 @@ def name(self): """ The name of the container. """ - if self.attrs.get('Name') is not None: - return self.attrs['Name'].lstrip('/') + return self.attrs['Name'].lstrip('/') @property def image(self):