This all basically looks good, and fixes an annoying long-standing bug, which is great. I just have one very minor thing to mention:
62 + if getattr(scheduler, 'setServiceParent', None) is not None:
63 + scheduler.setServiceParent(collection)
It seems a bit awkward to use getattr to (conditionally) retrieve the attribute and then retrieve it again via dot syntax. Perhaps this might be better:
setServiceParent = getattr(scheduler, 'setServiceParent', None)
if setServiceParent is not None:
setServiceParent(collection)
This all basically looks good, and fixes an annoying long-standing bug, which is great. I just have one very minor thing to mention:
62 + if getattr(scheduler, 'setServiceParent', None) is not None: setServiceParen t(collection)
63 + scheduler.
It seems a bit awkward to use getattr to (conditionally) retrieve the attribute and then retrieve it again via dot syntax. Perhaps this might be better:
setServiceParent = getattr(scheduler, 'setServiceParent', None) arent(collectio n)
if setServiceParent is not None:
setServiceP
or even:
getattr(scheduler, 'setServiceParent', lambda ign: None)(collection)
Please go ahead and merge regardless of whether you change this code or not.