Salome HOME
Fix problem on Mandriva 2006 64-bit with vtk Python modules importing
[tools/install.git] / config_files / patches / vtk-4.2.6-patented.patch
1 diff -Naur VTK-4.2.6-original/Wrapping/Python/vtk/__helper.py VTK-4.2.6-patched/Wrapping/Python/vtk/__helper.py
2 --- VTK-4.2.6-original/Wrapping/Python/vtk/__helper.py  2001-10-31 23:30:50.000000000 +0300
3 +++ VTK-4.2.6-patched/Wrapping/Python/vtk/__helper.py   2007-01-15 12:23:15.631470353 +0300
4 @@ -9,7 +9,8 @@
5      """ Checks to see if the ImportError was because the library
6      itself was not there or because there was a link error.  If there
7      was a link error it raises a LinkError if not it does nothing."""
8 -    del sys.modules['vtk.%s'%mod_name]
9 +    if sys.modules.has_key('vtk.%s'%mod_name):
10 +       del sys.modules['vtk.%s'%mod_name]
11      mod = 'vtk' + string.upper(mod_name[0]) + mod_name[1:] +'Python'
12      if string.find(str(exc), mod) == -1:
13         raise LinkError, str(exc)