Skip to content

Commit

Permalink
Add raising exception while marker file path is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
dplocki committed May 19, 2024
1 parent 6651f59 commit d8b1817
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions e2e/test_simple_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,4 @@ def test_download_since_last_run_with_missing_marker_file_setup(
podcast_downloader.run()

# Assert
assert marker_file_manager.is_exists()
assert podcast_downloader.is_containing("Marker file")
assert podcast_downloader.is_containing("Marker file")
8 changes: 7 additions & 1 deletion podcast_downloader/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ def configuration_to_function_on_empty_directory(
return lambda source: source

if configuration_value == "download_since_last_run":
return only_entities_from_date(last_run_date)
if last_run_date:
return only_entities_from_date(last_run_date)

logger.error(
'The "download_since_last_run" require setup the "last_run_mark_file_path"'
)
raise Exception("Missing the last run mark file")

local_time = time.localtime()

Expand Down

0 comments on commit d8b1817

Please sign in to comment.