Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
72c6e41b
Commit
72c6e41b
authored
Mar 14, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
464598a0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
backend/controller/download_manager.py
backend/controller/download_manager.py
+1
-6
backend/view/download.py
backend/view/download.py
+12
-4
No files found.
backend/controller/download_manager.py
View file @
72c6e41b
...
@@ -181,12 +181,7 @@ class DownloadManager(object):
...
@@ -181,12 +181,7 @@ class DownloadManager(object):
AppDownload
(
app
=
app
,
imei
=
data
.
get
(
"imei"
))
AppDownload
(
app
=
app
,
imei
=
data
.
get
(
"imei"
))
commit
()
commit
()
# 读取epk文件,按照格式返回相应结构体数据
return
epk_path
,
"get dictionary {}."
.
format
(
"success"
if
epk_path
else
"no data"
)
result
=
None
with
open
(
epk_path
,
"rb"
)
as
f
:
result
=
f
.
read
()
return
str
(
result
),
"get dictionary {}."
.
format
(
"success"
if
result
else
"no data"
)
def
getList
(
self
,
data
):
def
getList
(
self
,
data
):
if
not
data
or
len
(
data
)
<=
0
:
if
not
data
or
len
(
data
)
<=
0
:
...
...
backend/view/download.py
View file @
72c6e41b
...
@@ -53,10 +53,18 @@ def delete(id):
...
@@ -53,10 +53,18 @@ def delete(id):
def
get
():
def
get
():
try
:
try
:
result
,
message
=
signalManager
.
actionGetDownload
.
emit
(
request
.
schema_data
)
result
,
message
=
signalManager
.
actionGetDownload
.
emit
(
request
.
schema_data
)
if
result
:
print
(
message
)
return
response_result
(
ResponseCode
.
OK
,
data
=
result
,
msg
=
message
)
# if result:
else
:
# return response_result(ResponseCode.OK, data=result, msg=message)
return
response_result
(
ResponseCode
.
REQUEST_ERROR
,
msg
=
message
)
# else:
# return response_result(ResponseCode.REQUEST_ERROR, msg=message)
# 读取epk文件,按照格式返回相应结构体数据
ret
=
""
if
os
.
path
.
exists
(
result
):
with
open
(
result
,
"r"
,
"utf-8"
)
as
f
:
ret
=
f
.
read
()
return
ret
except
Exception
as
e
:
except
Exception
as
e
:
traceback
.
print_exc
()
traceback
.
print_exc
()
logger
.
error
(
str
(
e
))
logger
.
error
(
str
(
e
))
...
...
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