-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
user: compare Mac user properties using same type #62973
Merged
Merged
Conversation
This file contains 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
ansibot
added
affects_2.10
This issue/PR affects Ansible v2.10
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
small_patch
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
system
System category
labels
Sep 30, 2019
ansibot
added
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Oct 9, 2019
bcoca
previously requested changes
Oct 10, 2019
bcoca
removed
the
needs_triage
Needs a first human triage before being processed.
label
Oct 10, 2019
ansibot
added
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
and removed
core_review
In order to be merged, this PR must follow the core review workflow.
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
labels
Oct 10, 2019
ansibot
added
the
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
label
Oct 19, 2019
ansibot
added
the
stale_review
Updates were made after the last review and the last review is more than 7 days old.
label
Nov 4, 2019
self._get_user_property returns a string, so when doing a comparison using this value, cast the second variable to a string so that the comparison behaves correctly
ansibot
added
core_review
In order to be merged, this PR must follow the core review workflow.
and removed
needs_revision
This PR fails CI tests or a maintainer has requested a review/revision of the PR.
stale_review
Updates were made after the last review and the last review is more than 7 days old.
labels
Nov 22, 2019
ansibot
removed
small_patch
stale_ci
This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
labels
Nov 22, 2019
ansibot
added
the
support:community
This issue/PR relates to code supported by the Ansible community.
label
Nov 22, 2019
samdoran
pushed a commit
to samdoran/ansible
that referenced
this pull request
Nov 22, 2019
…sible#62973) self._get_user_property returns a string, so when doing a comparison using this value, cast the second variable to a string so that the comparison behaves correctly * Add changelog * Add to_text import * Add integration test. (cherry picked from commit c73288a) Co-authored-by: John Chen <kryptonite303@users.noreply.github.com>
samdoran
pushed a commit
to samdoran/ansible
that referenced
this pull request
Dec 3, 2019
…sible#62973) self._get_user_property returns a string, so when doing a comparison using this value, cast the second variable to a string so that the comparison behaves correctly * Add changelog * Add to_text import * Add integration test. (cherry picked from commit c73288a) Co-authored-by: John Chen <kryptonite303@users.noreply.github.com>
D3DeFi
pushed a commit
to D3DeFi/ansible
that referenced
this pull request
Dec 8, 2019
self._get_user_property returns a string, so when doing a comparison using this value, cast the second variable to a string so that the comparison behaves correctly * Add changelog * Add to_text import * Add integration test
anshulbehl
pushed a commit
to anshulbehl/ansible
that referenced
this pull request
Dec 10, 2019
self._get_user_property returns a string, so when doing a comparison using this value, cast the second variable to a string so that the comparison behaves correctly * Add changelog * Add to_text import * Add integration test
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.10
This issue/PR affects Ansible v2.10
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
new_contributor
This PR is the first contribution by a new community member.
support:community
This issue/PR relates to code supported by the Ansible community.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
system
System category
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.
SUMMARY
self._get_user_property
returns a string, so when doing a comparisonusing this value, cast the second variable to a string so that the
comparison behaves correctly.
On Darwin systems,
_get_user_property
returns a string, however,self.__dict__[field[0]]
sometimes returns anint
, such as in the case when comparing theuid
. In order for the comparisonto work correctly, both variables must be of the same type. This change casts
self.__dict__[field[0]]
to a string so that the comparison works properly.Fixes #62969
ISSUE TYPE
COMPONENT NAME
user module
ADDITIONAL INFORMATION