提交 417836c3 编写于 作者: B barrierye

bug fix

上级 39cc7f17
...@@ -87,6 +87,7 @@ class ChannelDataType(enum.Enum): ...@@ -87,6 +87,7 @@ class ChannelDataType(enum.Enum):
CHANNEL_PBDATA = 0 CHANNEL_PBDATA = 0
CHANNEL_FUTURE = 1 CHANNEL_FUTURE = 1
CHANNEL_NPDATA = 2 CHANNEL_NPDATA = 2
ERROR = 3
class ChannelData(object): class ChannelData(object):
...@@ -116,6 +117,7 @@ class ChannelData(object): ...@@ -116,6 +117,7 @@ class ChannelData(object):
pbdata.ecode = ecode pbdata.ecode = ecode
pbdata.id = data_id pbdata.id = data_id
pbdata.error_info = error_info pbdata.error_info = error_info
datatype = ChannelDataType.ERROR.value
else: else:
if datatype == ChannelDataType.CHANNEL_FUTURE.value: if datatype == ChannelDataType.CHANNEL_FUTURE.value:
if pbdata is None: if pbdata is None:
...@@ -136,7 +138,7 @@ class ChannelData(object): ...@@ -136,7 +138,7 @@ class ChannelData(object):
pbdata.error_info = error_info pbdata.error_info = error_info
logging.error(pbdata.error_info) logging.error(pbdata.error_info)
else: else:
for name, value in postped_data.items(): for name, value in npdata.items():
inst = channel_pb2.Inst() inst = channel_pb2.Inst()
inst.data = value.tobytes() inst.data = value.tobytes()
inst.name = name inst.name = name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册