Commit 72c6e41b authored by wanli's avatar wanli

update

parent 464598a0
......@@ -181,12 +181,7 @@ class DownloadManager(object):
AppDownload(app=app, imei=data.get("imei"))
commit()
# 读取epk文件,按照格式返回相应结构体数据
result = None
with open(epk_path, "rb") as f:
result = f.read()
return str(result), "get dictionary {}.".format("success" if result else "no data")
return epk_path, "get dictionary {}.".format("success" if epk_path else "no data")
def getList(self, data):
if not data or len(data) <= 0:
......
......@@ -53,10 +53,18 @@ def delete(id):
def get():
try:
result, message = signalManager.actionGetDownload.emit(request.schema_data)
if result:
return response_result(ResponseCode.OK, data=result, msg=message)
else:
return response_result(ResponseCode.REQUEST_ERROR, msg=message)
print(message)
# if result:
# return response_result(ResponseCode.OK, data=result, 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:
traceback.print_exc()
logger.error(str(e))
......
Markdown is supported
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