fix python 2.7 resolve_ip errors