From bf8367367e8ff813d6c9b5ef205ce517edb62678 Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Fri, 20 Sep 2019 09:53:14 +0800 Subject: [PATCH] fix download.py empty line, test=develop (#19870) --- python/paddle/dataset/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/dataset/common.py b/python/paddle/dataset/common.py index ce16e3b851..e8c27180ee 100644 --- a/python/paddle/dataset/common.py +++ b/python/paddle/dataset/common.py @@ -72,6 +72,9 @@ def download(url, module_name, md5sum, save_name=None): url.split('/')[-1] if save_name is None else save_name) + if os.path.exists(filename) and md5file(filename) == md5sum: + return filename + retry = 0 retry_limit = 3 while not (os.path.exists(filename) and md5file(filename) == md5sum):