mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
854d47826c
When unittesting this we found that the platform selecting class hierarchies weren't working in all cases. If the subclass was directly created (ie: LinuxHardware()), then it would use its inherited __new__() to try to create itself. The inherited __new__ would look for subclasses and end up calling its own __new__() again. This would recurse endlessly. The new code detects when we want to find a subclass to create (when the base class is used, ie: Hardware()) vs when to create the class itself (when the subclass is used, ie: LinuxHardware()). |
||
---|---|---|
.. | ||
ansible |