mrtrix3.path.wait_for(): Fix variable ghosting #2968
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thought that I had resolved this previously, probably when doing #2609, but in doing some other refactoring discovered that the problematic code was still in place. Maybe I fixed it some time but never pushed.
num_exit()
was a bad name for the function given its operation; it checks for the number of files in a list that exist. But there was also an integer variable callednum_exist
.num_in_use()
function immediately got hidden behind integer variablenum_in_use
.Function was immediately waiting 60s, rather than the intended operation of using a progressively increasing delay time up to a maximum of 60s.
The functionality should be reviewable from the code, it's pretty obviously wrong. Verifying within an existing script is hard because I can't replicate the circumstances in which it is required, but I've at least tested in an interactive Python terminal.