[AnsibleHostBase] raise AttributeError in __getattr__#2354
Merged
lolyu merged 1 commit intosonic-net:masterfrom Oct 16, 2020
Merged
[AnsibleHostBase] raise AttributeError in __getattr__#2354lolyu merged 1 commit intosonic-net:masterfrom
lolyu merged 1 commit intosonic-net:masterfrom
Conversation
As `__getattr__` is the last place searching for an attribute, no need to resort to `object` because: 1. there is no `__getattr__` in `object`. 2. the Python attribute lookup has already searched `object` before calling `__getattr__`. So, raise `AttributeError` in the end. Signed-off-by: Longxiang Lyu <[email protected]>
Collaborator
Author
|
@wangxin, could you please help to review, thanks! |
wangxin
approved these changes
Oct 16, 2020
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
swss: * 665bbbb 2022-06-27 | Add support for IP interface loopback action (sonic-net#2307) (HEAD -> 202205, github/202205) [Lior Avramov] * c7f5743 2022-06-28 | [asan] suppress the static variable leaks (sonic-net#2354) [Yakiv Huryk] * 37e2a31 2022-06-28 | [tests] [asan] add graceful stop flag (sonic-net#2347) [Yakiv Huryk] * 5ab84cf 2022-06-28 | [202205][cherry-pick] Fix mux_acl_rule adding issue (sonic-net#2358) [bingwang-ms] linkmgrd: * a836ef7 2022-06-28 | Use Vlan MAC as src MAC for link prober by default (sonic-net#93) (HEAD -> 202205) [Jing Zhang] * a828e86 2022-06-28 | Fix inconsistent mux state (sonic-net#92) (github/202205) [Longxiang Lyu] Signed-off-by: Ying Xie <[email protected]>
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.
Description of PR
As
__getattr__is the last place searching for an attribute, no needto resort to
objectbecause:__getattr__inobject.objectbeforecalling
__getattr__.So, raise
AttributeErrorin the end.Signed-off-by: Longxiang Lyu [email protected]
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
How did you do it?
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation