Skip to content

Commit

Permalink
update md5 function name
Browse files Browse the repository at this point in the history
  • Loading branch information
gidden committed May 3, 2017
1 parent 86fd914 commit 9672bf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
_default_cache_dir = _os.sep.join(('~', '.xarray_tutorial_data'))


def _md5(fname):
def file_md5_checksum(fname):
hash_md5 = hashlib.md5()
with open(fname, "rb") as f:
hash_md5.update(f.read())
Expand Down Expand Up @@ -71,7 +71,7 @@ def load_dataset(name, cache=True, cache_dir=_default_cache_dir,
url = '/'.join((github_url, 'raw', branch, md5name))
_urlretrieve(url, md5file)

localmd5 = _md5(localfile)
localmd5 = file_md5_checksum(localfile)
with open(md5file, 'r') as f:
remotemd5 = f.read()
if localmd5 != remotemd5:
Expand Down

0 comments on commit 9672bf3

Please sign in to comment.