提交 0a3391bf 编写于 作者: Z zhangjun

fix serving_bin download

上级 d8852342
...@@ -386,8 +386,6 @@ class Server(object): ...@@ -386,8 +386,6 @@ class Server(object):
return return
if not os.path.exists(self.server_path): if not os.path.exists(self.server_path):
os.system("touch {}/{}.is_download".format(self.module_path,
folder_name))
print('Frist time run, downloading PaddleServing components ...') print('Frist time run, downloading PaddleServing components ...')
r = os.system('wget ' + bin_url + ' --no-check-certificate') r = os.system('wget ' + bin_url + ' --no-check-certificate')
...@@ -403,9 +401,10 @@ class Server(object): ...@@ -403,9 +401,10 @@ class Server(object):
tar = tarfile.open(tar_name) tar = tarfile.open(tar_name)
tar.extractall() tar.extractall()
tar.close() tar.close()
open(download_flag, "a").close()
except: except:
if os.path.exists(exe_path): if os.path.exists(self.server_path):
os.remove(exe_path) os.remove(self.server_path)
raise SystemExit( raise SystemExit(
'Decompressing failed, please check your permission of {} or disk space left.' 'Decompressing failed, please check your permission of {} or disk space left.'
.format(self.module_path)) .format(self.module_path))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册