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:
Toshio Kuratomi 2015-07-23 12:11:10 -07:00
commit f8e4aff4c1
3 changed files with 10 additions and 13 deletions

View file

@ -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)