Commit e5bf73d1 authored by Yuan Zhixiang's avatar Yuan Zhixiang
Browse files

部分错误提示换成中文

parent fe11025a
......@@ -29,7 +29,7 @@ def visualize():
# 校验测试的代码
if code is None:
return {'error': 'Code does not exist.'}
return {'error': '你的代码呢?'}
key = code + '#' + stdin
if redis_available:
......@@ -40,11 +40,11 @@ def visualize():
# 执行分析脚本
result = run_python2_script_and_get_output(code, stdin)
if result is None:
return {'error': 'Analysis failed.'}
return {'error': '分析失败。'}
elif len(result) == 0:
return {'error': 'Analysis failed.'}
return {'error': '分析失败。'}
elif result == 'timeout':
return {'error': 'Timeout.'}
return {'error': '程序过大,分析超时。'}
else:
if redis_available:
r.set(key, result)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment