Skip to content

Commit

Permalink
actually skip downloads when skipping them
Browse files Browse the repository at this point in the history
  • Loading branch information
jktomer committed Jan 8, 2024
1 parent 196faef commit d539913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion finance_dl/pge.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def process_download(self, download_result, output_dir):
new_path = self.get_output_path(output_dir, date)
if os.path.exists(new_path):
logger.info('Skipping duplicate download: %s', date)
return True
return False
tmp_path = new_path.replace('.pdf', '.tmp.pdf')
with open(tmp_path, 'wb') as f:
download_data = download_result[1]
Expand Down

0 comments on commit d539913

Please sign in to comment.