Flake8 fixes. Version bump to 0.1.1

This commit is contained in:
Eddy Hintze 2020-01-25 11:35:53 -05:00
parent 593195bc1c
commit 8d9c3b0e36
3 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,10 @@
# Change log # Change log
### 0.1.1
- Delete failed downloaded files
### 0.1.0 ### 0.1.0
- Filename saved is now the original name of the file - Filename saved is now the original name of the file
- key used in cache is different due to changing the file name (this may result in duplicate downloads if you have run the older version) - key used in cache is different due to changing the file name (this may result in duplicate downloads if you have run the older version)

View File

@ -1 +1 @@
__version__ = '0.1.0' __version__ = '0.1.1'

View File

@ -110,7 +110,9 @@ class DownloadLibrary:
self._download_file(product_r, local_filename) self._download_file(product_r, local_filename)
except (Exception, KeyboardInterrupt) as e: except (Exception, KeyboardInterrupt) as e:
if self.progress_bar: print() if self.progress_bar:
# Do not overwrite the progress bar on next print
print()
logger.error("Failed to download file {product_title}/{url_filename}" # noqa: E501 logger.error("Failed to download file {product_title}/{url_filename}" # noqa: E501
.format(product_title=product_title, .format(product_title=product_title,
url_filename=url_filename)) url_filename=url_filename))
@ -125,7 +127,9 @@ class DownloadLibrary:
continue continue
else: else:
if self.progress_bar: print() if self.progress_bar:
# Do not overwrite the progress bar on next print
print()
self._update_cache_data(cache_file_key, file_info) self._update_cache_data(cache_file_key, file_info)
finally: finally: