Merge "Fix all-nodes.sh for python3"
This commit is contained in:
commit
9c789587c3
@ -33,7 +33,7 @@ function ping_controller_ips() {
|
||||
networks=$(ip r | grep -v default | cut -d " " -f 1)
|
||||
fi
|
||||
for LOCAL_NETWORK in $networks; do
|
||||
in_network=$(python -c "import ipaddress; net=ipaddress.ip_network(unicode('$LOCAL_NETWORK')); addr=ipaddress.ip_address(unicode('$REMOTE_IP')); print(addr in net)")
|
||||
in_network=$(python -c "import ipaddress; net=ipaddress.ip_network(u'$LOCAL_NETWORK'); addr=ipaddress.ip_address(u'$REMOTE_IP'); print(addr in net)")
|
||||
if [[ $in_network == "True" ]]; then
|
||||
echo "Trying to ping $REMOTE_IP for local network ${LOCAL_NETWORK}."
|
||||
set +e
|
||||
|
Loading…
x
Reference in New Issue
Block a user