Comment 2 for bug 394041

Revision history for this message
Nadia Alramli (nadiana) wrote :

Hi,

Thanks for reporting this bug. I was able to reproduce the issue. It was simply because GetDefaultPath is overridden with different number of arguments in subclasses. In python there is no overloading, so if a subclass defines a method with the same name as a method in the parent. That method will override the parent method even if it had different number of arguments. There are two ways to fix this:
1. Explicitly call the base class method _PathCtrl.GetDefaultPath(self, default_path)
2. Change the base class method name to something else and make sure all child methods are updated to use the new name.
I prefer the second solution, but I'll let Stani decide.