Skip to content

Commit

Permalink
Bug fix: don't recreate database if resuming
Browse files Browse the repository at this point in the history
  • Loading branch information
chosak committed Nov 2, 2023
1 parent 438ad12 commit a58c707
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crawler/management/commands/crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def command(start_url, db_filename, max_pages, depth, recreate, resume):
"or --resume to resume a previous crawl."
)

os.remove(db_filename)
if recreate:
os.remove(db_filename)

wpull_progress_filename = f"{db_filename}.wpull.db"
click.echo(
Expand Down

0 comments on commit a58c707

Please sign in to comment.