779b9a10 by 周伟奇

fix error msg

1 parent 55c99301
......@@ -85,6 +85,7 @@ RES_SUCCESS_OTHER = '识别成功(其他类)'
RES_SUCCESS_EMPTY = '识别成功(空数据)'
RES_FAILED_1 = '识别失败(阶段1)'
RES_FAILED_2 = '识别失败(阶段2)'
RES_FAILED_3 = '识别失败(阶段1数据格式错误)'
CARD_RATIO = 0.9
UNKNOWN_CARD = '未知卡号'
......
......@@ -496,7 +496,7 @@ class Command(BaseCommand, LoggerMixin):
if res.get('code') == 1:
ocr_data_list = res.get('data', [])
if not isinstance(ocr_data_list, list):
res_list.append((pno, ino, consts.RES_FAILED_1))
res_list.append((pno, ino, consts.RES_FAILED_3))
self.cronjob_log.info('{0} [ocr_1 res error] [img={1}] [res={2}]'.format(
self.log_base, img_path, res))
else:
......@@ -504,7 +504,7 @@ class Command(BaseCommand, LoggerMixin):
ino_part = '{0}-{1}'.format(ino, part_idx)
classify = ocr_data.get('classify')
if classify is None:
res_list.append((pno, ino_part, consts.RES_FAILED_1))
res_list.append((pno, ino_part, consts.RES_FAILED_3))
self.cronjob_log.info('{0} [ocr_1 res error] [img={1}] [res={2}]'.format(
self.log_base, img_path, res))
continue
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!