Skip to content

Commit

Permalink
Display which sites or dbs are missing in console
Browse files Browse the repository at this point in the history
  • Loading branch information
micahflee committed Jul 5, 2024
1 parent 49626f0 commit a053e6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,15 @@ def catch_all(path):
if not os.path.isfile(os.path.join(get_dbs_path(), f"{site}.sqlite3")):
missing_dbs.append(site)
if len(missing_sites) > 0:
print(f"Missing sites: {missing_sites}")
sys.stdout.flush()
return render_template(
"error.html",
error_message=f"Can't find the unzipped BlueLeaks dataset. Fix the volume that maps to {get_blueleaks_path()} in your docker-compose.yaml.",
)
if len(missing_dbs) > 0:
print(f"Missing databases: {missing_dbs}")
sys.stdout.flush()
return render_template(
"error.html",
error_message="SQLite3 databases are missing. You probably haven't run the initialize.py script yet.",
Expand Down

0 comments on commit a053e6f

Please sign in to comment.