piiswrong commented on a change in pull request #7892: allow users to specify 
repo url for downloadable contents
URL: https://github.com/apache/incubator-mxnet/pull/7892#discussion_r140095325
 
 

 ##########
 File path: python/mxnet/gluon/utils.py
 ##########
 @@ -207,4 +207,14 @@ def download(url, path=None, overwrite=False, 
sha1_hash=None):
                 if chunk: # filter out keep-alive new chunks
                     f.write(chunk)
 
+        if sha1_hash and not check_sha1(fname, sha1_hash):
+            raise UserWarning('File {} is downloaded but the content hash does 
not match. ' \
 
 Review comment:
   even without overwrite=True?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to