From b7c1a068b675b0c09f9121c9d9c5d3921985b7e7 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Tue, 4 Oct 2016 16:26:38 -0700 Subject: [PATCH] auto-t: Expand "to string" for known network --- autotests/util/iwd.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index 6ba62d1d..e20bc8db 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -382,8 +382,13 @@ class KnownNetwork(): self._last_connected_time = n_n_object['LastConnectedTime'] self._last_seen_time = n_n_object['LastSeenTime'] - def __str__(self): - return 'Name' + self.name + ' Type' + self.type + def __str__(self, prefix = ''): + return prefix + 'Known Network:\n' \ + + prefix + '\tName:\t' + self.name + '\n' \ + + prefix + '\tType:\t' + str(self.type) + '\n' \ + + prefix + '\tLast connected:\t' + self.last_connected_time + \ + '\n' \ + + prefix + '\tLast seen:\t' + self.last_seen_time class OrderedNetwork(object):