Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ethPM] Improved duplicate contract types error message #1532

Merged
merged 1 commit into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion ethpm/tools/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,9 @@ def normalize_compiler_output(compiler_output: Dict[str, Any]) -> Dict[str, Any]
]
paths, names = zip(*paths_and_names)
if len(names) != len(set(names)):
duplicates = set([name for name in names if names.count(name) > 1])
raise ManifestBuildingError(
"Duplicate contract names were found in the compiler output."
f"Duplicate contract types: {duplicates} were found in the compiler output."
)
return {
name: normalize_contract_type(compiler_output[path][name])
Expand Down
1 change: 1 addition & 0 deletions newsfragments/1532.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve error message in ethpm's builder.