IMDb import: fix assertion
We should only assert where we know the result, here the input file could just as well be empty.
This commit is contained in:
parent
69643455a6
commit
7a7d619e64
1 changed files with 3 additions and 1 deletions
|
|
@ -198,7 +198,9 @@ async def import_from_file(*, basics_path: Path, ratings_path: Path):
|
||||||
|
|
||||||
log.info("💾 Importing movies ...")
|
log.info("💾 Importing movies ...")
|
||||||
total = count_lines(basics_path)
|
total = count_lines(basics_path)
|
||||||
assert total != 0
|
log.debug("Found %i movies.", total)
|
||||||
|
if total == 0:
|
||||||
|
raise RuntimeError(f"No movies found.")
|
||||||
perc_next_report = 0.0
|
perc_next_report = 0.0
|
||||||
perc_step = 0.1
|
perc_step = 0.1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue