Add support for differentiating one-off containers

This is a basic start, the API is pretty shonky.
This commit is contained in:
Ben Firshman 2013-12-20 10:46:55 +00:00
commit 2f28265d10
4 changed files with 52 additions and 22 deletions

View file

@ -124,3 +124,11 @@ class Container(object):
def attach_socket(self, **kwargs):
return self.client.attach_socket(self.id, **kwargs)
def __repr__(self):
return '<Container: %s>' % self.name
def __eq__(self, other):
if type(self) != type(other):
return False
return self.id == other.id