- def __init__(self,hostname,buildname=None,key=None, username=None,unknown_host=True, root=None):
- self.hostname=hostname
- self.buildname=buildname
- self.key=key
- self.username=username
- self.unknown_host=unknown_host
- self.root=root
+ def __init__(self, hostname, buildname=None, key=None, username=None, unknown_host=True, root=None):
+ self.hostname = hostname
+ self.buildname = buildname
+ self.key = key
+ self.username = username
+ self.unknown_host = unknown_host
+ self.root = root
+
+ def __repr__(self):
+ result = "{}@{}".format(self.username or 'root', self.hostname)
+ if self.key:
+ result += " <key {}>".format(self.key)
+ return result