Skip to content

Commit

Permalink
fix error in download method
Browse files Browse the repository at this point in the history
  • Loading branch information
willemarcel committed Jan 11, 2016
1 parent b074458 commit ec68d53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions sentinelsat/sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,12 @@ def download(self, id, path='.', checksum=False, **kwargs):
print('Downloading %s to %s' % (id, path))

# Check if the file exists and passes md5 test
if exists(path) and md5_compare(path, product['md5'].lower()):
print('%s was already downloaded.' % path)
return path
else:
remove(path)
if exists(path):
if md5_compare(path, product['md5'].lower()):
print('%s was already downloaded.' % path)
return path
else:
remove(path)

download(product['url'], path=path, session=self.session, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


setup(name='sentinelsat',
version='0.5.4',
version='0.5.5',
description="Utility to search and download Sentinel-1 Imagery",
long_description=long_description,
classifiers=[
Expand Down

0 comments on commit ec68d53

Please sign in to comment.