Commit 29844f7c authored by wanli's avatar wanli

update

parent df724099
...@@ -80,7 +80,8 @@ class AppsManager(object): ...@@ -80,7 +80,8 @@ class AppsManager(object):
app_info = epk.pack() app_info = epk.pack()
epk_filename = os.sep.join([os.path.dirname(epk_path).replace(config.get("UPLOAD_PATH"), ""), "{}.epk".format(app.app_name)]).replace('\\', '/') epk_filename = os.sep.join([os.path.dirname(epk_path).replace(config.get("UPLOAD_PATH"), ""), "{}.epk".format(app.app_name)]).replace('\\', '/')
app_info['md5'] = str(app_info['md5']) if app_info:
app_info['md5'] = str(app_info['md5'])
result = BuildLogs(app=app, app_path=epk_filename, app_info=app_info, create_by=editor, create_at=datetime.now(), update_by=editor, update_at=datetime.now()) result = BuildLogs(app=app, app_path=epk_filename, app_info=app_info, create_by=editor, create_at=datetime.now(), update_by=editor, update_at=datetime.now())
commit() commit()
......
...@@ -72,7 +72,8 @@ class BuildLogsManager(object): ...@@ -72,7 +72,8 @@ class BuildLogsManager(object):
params['algorithm'] = "h" params['algorithm'] = "h"
epk = EpkApp(**params) epk = EpkApp(**params)
app_info = epk.pack() app_info = epk.pack()
app_info['md5'] = str(app_info['md5']) if app_info:
app_info['md5'] = str(app_info['md5'])
# 更新数据库对应文件路径 # 更新数据库对应文件路径
for sf in source_files: for sf in source_files:
......
...@@ -216,6 +216,7 @@ class EpkApp(object): ...@@ -216,6 +216,7 @@ class EpkApp(object):
# infos = self.epkInfo() # infos = self.epkInfo()
epkFileBytes = b"" epkFileBytes = b""
ret = None
epkFileContentBytes = b"" epkFileContentBytes = b""
file_count = len(infos["files"]) file_count = len(infos["files"])
with open(self._epkName, "wb") as f: with open(self._epkName, "wb") as f:
...@@ -255,6 +256,8 @@ class EpkApp(object): ...@@ -255,6 +256,8 @@ class EpkApp(object):
pprint.pprint(ret) pprint.pprint(ret)
return ret
def main(path, appName, algorithm): def main(path, appName, algorithm):
epk = EpkApp(appName, path, algorithm) epk = EpkApp(appName, path, algorithm)
......
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