Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b1a699a5
authored
Jan 25, 2021
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
处理请求的格式不正确的情况
parent
0a001818
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
valid_server.py
valid_server.py
View file @
b1a699a5
...
@@ -7,7 +7,7 @@ import tornado.web
...
@@ -7,7 +7,7 @@ import tornado.web
import
tornado.ioloop
import
tornado.ioloop
from
utils.functions
import
pre_judge
,
word_conversion
,
cut_params
,
check_param
,
unit_conversion
,
get_not_exist_list
,
\
from
utils.functions
import
pre_judge
,
word_conversion
,
cut_params
,
check_param
,
unit_conversion
,
get_not_exist_list
,
\
check_encap
,
check_temp
,
check_symbol
check_encap
,
check_temp
,
check_symbol
from
utils.redis_cli
import
redis_cli
from
utils.redis_cli
import
redis_cli
from
predict.kw_predict
import
KwPredict
from
predict.kw_predict
import
KwPredict
...
@@ -97,10 +97,12 @@ class UCHandler(tornado.web.RequestHandler):
...
@@ -97,10 +97,12 @@ class UCHandler(tornado.web.RequestHandler):
async
def
post
(
self
):
async
def
post
(
self
):
data_list
=
json
.
loads
(
self
.
request
.
body
)
data_list
=
json
.
loads
(
self
.
request
.
body
)
print
(
data_list
)
if
not
data_list
:
if
not
data_list
:
code
=
'100002'
code
=
'100002'
res
=
code2msg
(
code
)
res
=
code2msg
(
code
)
elif
type
(
data_list
)
!=
list
:
code
=
'100001'
res
=
code2msg
(
code
)
else
:
else
:
res
=
{}
res
=
{}
attrs_list
=
[]
attrs_list
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment