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:
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user