Skip to content

Do not set _spec if an error is raised.#136

Merged
muhrin merged 2 commits intoaiidateam:developfrom
greschd:fix_catch_errors_when_creating_spec
Dec 12, 2019
Merged

Do not set _spec if an error is raised.#136
muhrin merged 2 commits intoaiidateam:developfrom
greschd:fix_catch_errors_when_creating_spec

Conversation

@greschd
Copy link
Copy Markdown
Member

@greschd greschd commented Dec 9, 2019

When an error is raised while building the spec of a process, the _spec attribute is deleted, and __called set to False. This ensures that subsequent calls to .spec() also raise the error instead of returning an incomplete spec.

Related AiiDA issue and PR: aiidateam/aiida-core#3604, aiidateam/aiida-core#3617

Comment thread test/test_processes.py Outdated
@muhrin
Copy link
Copy Markdown
Collaborator

muhrin commented Dec 10, 2019

Just to keep you updated: I'm working on fixing the tests which seem to have broken because of a new version of PyYaml

When an error is raised while building the spec of a process,
the _spec attribute is deleted, and __called set to False.
This ensures that subsequent calls to .spec() also raise the
error instead of returning an incomplete spec.
@greschd greschd force-pushed the fix_catch_errors_when_creating_spec branch from 721bc9e to 092f50e Compare December 10, 2019 10:49
@muhrin muhrin merged commit 12978cb into aiidateam:develop Dec 12, 2019
@greschd greschd deleted the fix_catch_errors_when_creating_spec branch December 12, 2019 11:51
unkcpz pushed a commit to unkcpz/plumpy that referenced this pull request Dec 14, 2024
When an error is raised while building the spec of a process,
the _spec attribute is deleted, and __called set to False.
This ensures that subsequent calls to .spec() also raise the
error instead of returning an incomplete spec.
agoscinski pushed a commit to agoscinski/plumpy that referenced this pull request Apr 13, 2026
When an error is raised while building the spec of a process,
the _spec attribute is deleted, and __called set to False.
This ensures that subsequent calls to .spec() also raise the
error instead of returning an incomplete spec.
agoscinski pushed a commit that referenced this pull request Apr 13, 2026
When an error is raised while building the spec of a process,
the _spec attribute is deleted, and __called set to False.
This ensures that subsequent calls to .spec() also raise the
error instead of returning an incomplete spec.
agoscinski pushed a commit that referenced this pull request Apr 13, 2026
When an error is raised while building the spec of a process,
the _spec attribute is deleted, and __called set to False.
This ensures that subsequent calls to .spec() also raise the
error instead of returning an incomplete spec.
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