Skip to content

Commit

Permalink
fix: Add better error message in the of unspecified custom database
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianMichelsen committed Jun 30, 2022
1 parent bf7f941 commit a711a01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/metaDMG/fit/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ def move_files(config: Config) -> None:
for source_path, target_path in d_move_source_target.items():
logger.debug(f"Moving {source_path} to {target_path}.")
if not source_path.is_file():
raise metadamageError(f"{source_path} does not exist.")
raise metadamageError(
f"{source_path} does not exist. If you use a custom database, "
"remember to use the bool flag --custom-database when creating "
"the config file."
)
target_path.parent.mkdir(parents=True, exist_ok=True)
shutil.move(source_path, target_path)

Expand Down

0 comments on commit a711a01

Please sign in to comment.