Remote.hostname doesn't have to be a property

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
Zack Cerza 2014-05-09 11:25:02 -05:00
parent b2648b21af
commit 36fe6a5830

View File

@ -35,6 +35,7 @@ class Remote(object):
def __init__(self, name, ssh=None, shortname=None, console=None,
host_key=None, keep_alive=True):
self.name = name
self.hostname = name.split('@')[-1]
self._shortname = shortname
self.host_key = host_key
self.keep_alive = keep_alive
@ -70,10 +71,6 @@ class Remote(object):
name = self.name
return name
@property
def hostname(self):
return self.name.split('@')[1]
@property
def is_online(self):
if self.ssh is None: