CDAT / vcs-js

3 stars 3 forks source link

Remove 'info' from __slots__ as it is not an attribute. #23

Closed danlipsa closed 6 years ago

danlipsa commented 6 years ago
b = vcs.getgraphicsmethod('boxfill', 'default')
b.__slots__ has "info" as a member of the list but
hasattr(b, "info") returns false
danlipsa commented 6 years ago

Fixes #22

danlipsa commented 6 years ago

@James-Crean @mattben Please review. @doutriaux1 Do you know why we have this extra 'info' in slots? I don't think was there a couple of months ago, and I could not find who adds it.

danlipsa commented 6 years ago

@scottwittenburg Please review

doutriaux1 commented 6 years ago

hum... a VERY long time ago they used to have an info attribute when we used the "autoAPI" module. I think it's safe to remove it.

scottwittenburg commented 6 years ago

+1

This prevents some WAMP error on loading the demo, and allows me to see the plot in the first column, first row. However, I still get a segfault in Python when clicking on a plot, even with this extra guard in place.

danlipsa commented 6 years ago

@doutriaux1 As @scottwittenburg pointed out, this is a safety check that is worth doing even if we find where the info thing comes from.