Unreal: fix p4 commandlet args nop4* showing when False#108
Open
jasugun wants to merge 1 commit into
Open
Conversation
Use getattr method with default instead, defaults visible
dda8978 to
3f41dc5
Compare
tdesveaux
reviewed
Dec 3, 2024
| p4_args_for_commandlet.append('-P4Passwd=%s' % env.p4pass) | ||
| if env.has_attribute('p4client'): | ||
| p4_args_for_commandlet.append('-P4Client=%s' % env.p4client) | ||
| if getattr(env, 'p4port', None): |
Contributor
There was a problem hiding this comment.
Why replace env.has_attribute?
Contributor
Author
There was a problem hiding this comment.
Because out of the box, short python achieves the same result as the helper, right?
The helper should be named attribute_is_not_none btw, it's misealding and was most likely the cause of the bug with bools.
@tdesveaux do you see any problem with taht?
If so I'll stick to changing the bools only.
ftith
approved these changes
Dec 4, 2024
Contributor
|
Wrongly closed by dev branch deletion |
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.
Use getattr method with default instead, defaults visible
env.has_attribute() is not working whith boolean args when False,
arg is not Nonereturns True in that case.