未验证 提交 c92b78b0 编写于 作者: W whs 提交者: GitHub

Fix unitest of light nas. (#18931)

test=develop
上级 e1b5833b
......@@ -82,15 +82,7 @@ class LightNASStrategy(Strategy):
self._server_ip = self._get_host_ip()
def _get_host_ip(self):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('8.8.8.8', 80))
ip = s.getsockname()[0]
finally:
s.close()
return ip
return socket.gethostbyname(socket.gethostname())
def on_compression_begin(self, context):
self._current_tokens = context.search_space.init_tokens()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册