Skip to content

Commit

Permalink
enforce ipv4
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfleischer committed Nov 26, 2023
1 parent c4d3de4 commit 20199fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cloudmesh/common/Host.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,14 @@ def _ping(args):
count = str(args['count'])

count_flag = '-n' if os_is_windows() else '-c'
if os_is_windows():
# if os_is_windows():
# adding ipv4 enforce for windows
# for some reason -4 is required or hosts
# fail. we need ipv4
command = ['ping', '-4', ip, count_flag, count]
else:
command = ['ping', count_flag, count, ip]
# command = ['ping', '-4', ip, count_flag, count]
# else:
# command = ['ping', count_flag, count, ip]
command = ['ping', '-4', ip, count_flag, count]
result = subprocess.run(command, capture_output=True)
print(result)
print('THAT WAS RESULT!!!')
Expand Down

0 comments on commit 20199fc

Please sign in to comment.