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 |