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

Add check in Selector.get_params for path uniqueness #597

Merged
merged 3 commits into from
Apr 29, 2015

Conversation

vdumoulin
Copy link
Contributor

This concerns issue #480. It's not a complete solution, but at least Selector won't do the wrong thing silently anymore.

@@ -177,6 +177,12 @@ def recursion(brick):
for child in brick.children:
for path, param in recursion(child).items():
new_path = Path([Path.BrickName(brick.name)]) + path
if new_path in result:
raise ValueError(
"name collision while retrieving parameters (" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please split this error message into a concise one and a verbose one like we do it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@rizar
Copy link
Contributor

rizar commented Apr 25, 2015

LGTM except for the error message.

@rizar
Copy link
Contributor

rizar commented Apr 29, 2015

Oops, forgot about it!

rizar added a commit that referenced this pull request Apr 29, 2015
Add check in Selector.get_params for path uniqueness
@rizar rizar merged commit cc94d66 into mila-iqia:master Apr 29, 2015
@vdumoulin vdumoulin deleted the selector_get_params branch May 1, 2015 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants