Provide more useful repr for IPDevice

This is handy when calling print on a list of IPDevice objects.

TrivialFix
Change-Id: I58195da032c2fa2546aa174b7b3c34c6470eeb5b
This commit is contained in:
Kevin Benton 2017-03-01 11:11:56 -08:00
parent 42631e3117
commit d794aee878

@ -283,6 +283,10 @@ class IPDevice(SubProcessBase):
def __str__(self):
return self.name
def __repr__(self):
return "<IPDevice(name=%s, namespace=%s)>" % (self._name,
self.namespace)
def exists(self):
"""Return True if the device exists in the namespace."""
# we must save and restore this before returning