Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit d8c94f7

Browse files
committed
Better error in config. (Issue #270)
1 parent b9ce7ed commit d8c94f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

data_diff/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ def _apply_config(config: Dict[str, Any], run_name: str, kw: Dict[str, Any]):
3636

3737
# Process databases + tables
3838
for index in "12":
39-
args = run_args.pop(index, {})
39+
try:
40+
args = run_args.pop(index)
41+
except KeyError:
42+
raise ConfigParseError(f"Could not find source #{index}: Expecting a key of '{index}' containing '.database' and '.table'.")
4043
for attr in ("database", "table"):
4144
if attr not in args:
4245
raise ConfigParseError(f"Running 'run.{run_name}': Connection #{index} is missing attribute '{attr}'.")

0 commit comments

Comments
 (0)