def ext_ip(self):
"""
The external ip for the game server. Will try to get only once and save to self._ext_ip for later use.
"""
if not self._ext_ip:
with settings(host_string=self.int_ip):
self._ext_ip = run('''curl -s ip.cn |awk '{split($2,x,"?");print x[2]}' ''')
return self._ext_ip
评论列表
文章目录