mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #31544 from DSRCompany/issues/29701_getattr_recursion_protection
Protect getattr from recursion
This commit is contained in:
commit
5a6aff1791
1 changed files with 3 additions and 2 deletions
|
@ -61,8 +61,9 @@ class SyncWrapper(object):
|
|||
def __getattribute__(self, key):
|
||||
try:
|
||||
return object.__getattribute__(self, key)
|
||||
except AttributeError:
|
||||
pass
|
||||
except AttributeError as ex:
|
||||
if key == 'async':
|
||||
raise ex
|
||||
attr = getattr(self.async, key)
|
||||
if hasattr(attr, '__call__'):
|
||||
def wrap(*args, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue