Simplify method structure

This commit is contained in:
Serene-Arc
2021-05-21 16:50:05 +10:00
committed by Serene
parent da8c64ec51
commit a104a154fc

View File

@@ -71,9 +71,10 @@ class RedditDownloader(RedditConnector):
for destination, res in self.file_name_formatter.format_resource_paths(content, self.download_directory): for destination, res in self.file_name_formatter.format_resource_paths(content, self.download_directory):
if destination.exists(): if destination.exists():
logger.debug(f'File {destination} already exists, continuing') logger.debug(f'File {destination} already exists, continuing')
continue
elif not self.download_filter.check_resource(res): elif not self.download_filter.check_resource(res):
logger.debug(f'Download filter removed {submission.id} with URL {submission.url}') logger.debug(f'Download filter removed {submission.id} with URL {submission.url}')
else: continue
try: try:
res.download(self.args.max_wait_time) res.download(self.args.max_wait_time)
except errors.BulkDownloaderException as e: except errors.BulkDownloaderException as e: