44c94328c8
`if method in dir(self):` is very inefficient: - it must construct a list object listing all the object attributes & methods - it must then perform a O(N) linear scan of that list Replace it with the idiomatic `if hasattr(self, method):`, which is a O(1) expected time hash lookup. Should fix #11981. |
||
---|---|---|
.. | ||
cli | ||
compat | ||
config | ||
errors | ||
executor | ||
galaxy | ||
inventory | ||
module_utils | ||
modules | ||
new_inventory | ||
parsing | ||
playbook | ||
plugins | ||
template | ||
utils | ||
vars | ||
__init__.py | ||
constants.py | ||
test-requirements.txt |