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 __getitem__ to Result class #2

Closed
wants to merge 1 commit into from

Conversation

ogenstad
Copy link
Collaborator

Ran into an issue after the results was swapped out to an object.

(brigade3) ~/src/playground/brigade-tests/demo ᐅ python do.py
Traceback (most recent call last):
File "do.py", line 97, in
deploy()
File "do.py", line 89, in deploy
filtered.run(task=base_config)
File "/Users/patrick/src/forks/brigade/brigade/core/init.py", line 132, in run
result.raise_on_error()
File "/Users/patrick/src/forks/brigade/brigade/core/task.py", line 93, in raise_on_error
raise BrigadeExecutionError(self)
brigade.core.exceptions.BrigadeExecutionError: ok: {}, failed:{'switch00.cmh': TypeError("'Result' object is not subscriptable",), 'switch01.cmh': TypeError("'Result' object is not subscriptable",)}

@dbarrosop
Copy link
Contributor

Yeah, that happened when I changed the result of the tasks to be an object instead of a dict. I am going to close this one because the API is not yet stable so I don't want to add a change for compatibility reasons. I am happy to discuss though if we want a dict or an object but that's a different topic so closing this one :)

Thanks!

@dbarrosop dbarrosop closed this Nov 24, 2017
@ogenstad ogenstad deleted the items branch November 24, 2017 15:33
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