mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Cleanups:
* Don't reference __class__ when we can use the instance itself * use isdisjoint() as it can stop once a match is found * Remove a condtional that was taken care of in the conditonal just above
This commit is contained in:
parent
4e3f5e3be6
commit
f8e4aff4c1
3 changed files with 10 additions and 13 deletions
|
@ -87,7 +87,7 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
|
|||
def _become_method_supported(self):
|
||||
''' Checks if the current class supports this privilege escalation method '''
|
||||
|
||||
if self._play_context.become_method in self.__class__.become_methods:
|
||||
if self._play_context.become_method in self.become_methods:
|
||||
return True
|
||||
|
||||
raise AnsibleError("Internal Error: this connection module does not support running commands via %s" % become_method)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue