Fix ip address format for python2.7