Fix resetenv() calls to not crash#2070
Open
czerouni wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Open
Fix resetenv() calls to not crash#2070czerouni wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
czerouni wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
Conversation
Signed-off-by: Craig Zerouni <czerouni@gmail.com>
187b4ea to
2df3a65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This addresses issue #2068
While trying to document resetenv() (which had a TODO in the docs) I noticed that Rez would always generate a python traceback when resetenv() was called.
The reason for this turns out to be that it is creating a "command" that is None because it is adding a line that is the return value of setenv. But that is always None. In any case, it doesn't do what rezconfig.py suggests it might. And it has a "friends" parameter that isn't used and whose purpose I couldn't guess at.
This PR "fixes" that by just having calls to resetenv() defer to setenv() since that is all that would currently happen even if it worked. As an aside, I think that resetenv should either be removed, or implemented as rezconfig.py implies.