未验证 提交 d66afebf 编写于 作者: Z zhouzj 提交者: GitHub

fix nas's bug (#1019)

上级 1a9376a8
...@@ -17,7 +17,7 @@ import time ...@@ -17,7 +17,7 @@ import time
import logging import logging
import socket import socket
from .log_helper import get_logger from .log_helper import get_logger
import sys
__all__ = ['ControllerClient'] __all__ = ['ControllerClient']
_logger = get_logger(__name__, level=logging.INFO) _logger = get_logger(__name__, level=logging.INFO)
...@@ -110,7 +110,10 @@ class ControllerClient(object): ...@@ -110,7 +110,10 @@ class ControllerClient(object):
socket_client.send("next_tokens".encode()) socket_client.send("next_tokens".encode())
tokens = socket_client.recv(1024).decode() tokens = socket_client.recv(1024).decode()
try:
tokens = [int(token) for token in tokens.strip("\n").split(",")] tokens = [int(token) for token in tokens.strip("\n").split(",")]
except ValueError:
sys.exit()
return tokens return tokens
def request_current_info(self): def request_current_info(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册