From 5c706ef468b988d2b638d12da99babf9adc5e9f2 Mon Sep 17 00:00:00 2001 From: wangxiao Date: Thu, 28 Nov 2019 20:36:32 +0800 Subject: [PATCH] update downloader.py --- paddlepalm/downloader.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/paddlepalm/downloader.py b/paddlepalm/downloader.py index e33ee7a..8110ef2 100644 --- a/paddlepalm/downloader.py +++ b/paddlepalm/downloader.py @@ -113,11 +113,9 @@ def _convert(path, silent=False): for root, dirs, files in os.walk(path + '/params1/'): for file in files: src_file = os.path.join(root, file) - newname = path + '/params1/' + '__paddlepalm_' + file - os.rename(src_file, newname) - tar_model.add(newname) - tar_info.write(newname) - os.remove(newname) + tar_model.add(src_file, '__paddlepalm_' + file) + tar_info.write('__paddlepalm_' + file) + os.remove(src_file) tar_model.close() tar_info.close() os.removedirs(path + '/params1/') -- GitLab