Skip to content

Commit

Permalink
Merge pull request #1532 from njgheorghita/ethpm-improve-error-msg
Browse files Browse the repository at this point in the history
[ethPM] Improved duplicate contract types error message
  • Loading branch information
njgheorghita authored Dec 3, 2019
2 parents e42739b + 658af9c commit 8ea04e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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.

0 comments on commit 8ea04e1

Please sign in to comment.