Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add a check to SQLite port DB script to ensure that the sqlite database passed to the script exists before trying to port from it #15306

Merged
merged 3 commits into from
Mar 22, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a check to determine that sqlite db exists before trying to port …
…from it
H-Shay committed Mar 22, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit db62d92944ef5eab57f5acda4066af52d5a18406
6 changes: 4 additions & 2 deletions synapse/_scripts/synapse_port_db.py
Original file line number Diff line number Diff line change
@@ -1328,8 +1328,10 @@ def main() -> None:
)

if not os.path.isfile(args.sqlite_database):
sys.stderr.write("The sqlite database you specified does not exist, please check that you have the" \
"correct path.")
sys.stderr.write(
"The sqlite database you specified does not exist, please check that you have the"
"correct path."
)
sys.exit(1)

sqlite_config = {