Commit 163f308b authored by David Gobbi's avatar David Gobbi
Browse files

Fix deprecated python type check in TestSubClass.

Now that the python wrappers use type objects for VTK classes, calling
type(obj) returns the class type, rather than 'vtkobject'.
parent 55e8252d
......@@ -34,7 +34,7 @@ class vtkCustomObject(vtk.vtkObject):
def SetExtraObject(self, o):
"""Setter method."""
# make sure it is "None" or a vtkobject instance
if o == None or type(o) == type(self):
if o == None or isinstance(o, vtk.vtkObjectBase):
self._ExtraObject = o
self.Modified()
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment