Skip to content

Commit

Permalink
MOAR
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Dec 12, 2023
1 parent c5bc3a4 commit f178e16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ jobs:
print(f"socket.getfqdn() : {socket.getfqdn()}")
print(f"socket.getfqdn(socket.gethostname()) : {socket.getfqdn(socket.gethostname())}")
print(f"socket.getfqdn(socket.getfqdn()) : {socket.getfqdn(socket.getfqdn())}")
print(f"socket.gethostbyname_ex(socket.gethostname())[0] : {socket.gethostbyname_ex(socket.gethostname())[0]}")
print(f"socket.gethostbyname_ex(socket.getfqdn())[0] : {socket.gethostbyname_ex(socket.getfqdn())[0]}")
print(f"socket.gethostbyname_ex(socket.gethostname()) : {socket.gethostbyname_ex(socket.gethostname())}")
print(f"socket.gethostbyname_ex(socket.getfqdn()) : {socket.gethostbyname_ex(socket.getfqdn())}")
- name: Test _is_process_running
shell: python
Expand Down
6 changes: 5 additions & 1 deletion cylc/flow/hostuserutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,22 @@ def is_remote_host(self, name):
Return True if host is unknown.
"""
print(f"### 0: {self._remote_hosts} ###")
if name not in self._remote_hosts:
if not name or name.startswith("localhost"):
# e.g. localhost4.localdomain4
self._remote_hosts[name] = False
else:
try:
host_info = self._get_host_info(name)
except IOError:
print(f"### 1: {host_info} ###")
except IOError as exc:
self._remote_hosts[name] = True
print(f"### E: {exc}")
else:
self._remote_hosts[name] = (
host_info != self._get_host_info())
print(f"### 2: {self._get_host_info()} ###")
return self._remote_hosts[name]

def is_remote_user(self, name):
Expand Down

0 comments on commit f178e16

Please sign in to comment.