diff --git a/src/leappto/cli.py b/src/leappto/cli.py index f3654efbf..0f9387505 100755 --- a/src/leappto/cli.py +++ b/src/leappto/cli.py @@ -28,7 +28,7 @@ MACROCONTAINER_STORAGE_DIR = '/var/lib/leapp/macrocontainers/' SOURCE_APP_EXPORT_DIR = '/var/lib/leapp/source_export/' -_LOCALHOST = ('localhost', '127.0.0.1') +_LOCALHOST='localhost' _MIN_PORT = 1 _MAX_PORT = 65535 @@ -248,7 +248,7 @@ def source_addr(self): return self.__get_machine_addr(self.source) def _ssh_base(self, addr, cfg): - if addr in _LOCALHOST: + if addr == _LOCALHOST: return [] return ['ssh'] + cfg + ['-4', addr] @@ -900,7 +900,7 @@ def _net_util(port_list): port_list = PortList() - if ip_or_fqdn in _LOCALHOST and not force_nmap: + if ip_or_fqdn in ('localhost', '127.0.0.1') and not force_nmap: return _net_util(port_list) ip = socket.gethostbyname(ip_or_fqdn)