Fix name parsing

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
Zack Cerza 2014-05-12 12:57:21 -05:00
parent b1859c7993
commit e0e012659f

View File

@ -35,7 +35,11 @@ class Remote(object):
def __init__(self, name, ssh=None, shortname=None, console=None,
host_key=None, keep_alive=True):
self.name = name
(self.user, self.hostname) = name.split('@')
if '@' in name:
(self.user, self.hostname) = name.split('@')
else:
self.user = os.getlogin()
self.hostname = name
self._shortname = shortname
self.host_key = host_key
self.keep_alive = keep_alive