summaryrefslogtreecommitdiff
path: root/dev-python/pyvtk/files/pyvtk-0.4.74.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pyvtk/files/pyvtk-0.4.74.patch')
-rw-r--r--dev-python/pyvtk/files/pyvtk-0.4.74.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/dev-python/pyvtk/files/pyvtk-0.4.74.patch b/dev-python/pyvtk/files/pyvtk-0.4.74.patch
new file mode 100644
index 00000000000..651c1f5ec37
--- /dev/null
+++ b/dev-python/pyvtk/files/pyvtk-0.4.74.patch
@@ -0,0 +1,20 @@
+--- PyVTK-0.4.74/lib/__init__.py 2003-04-07 16:56:08.000000000 +0200
++++ PyVTK-0.4.74/lib/__init__.py 2008-12-03 18:08:35.000000000 +0100
+@@ -202,7 +202,7 @@
+ #print 'Reading file',`filename`
+ f = open(filename,'rb')
+ l = f.readline()
+- if not l.strip().replace(' ','').lower() == '#vtkdatafileversion2.0':
++ if not l.strip()[-3:] == '1.0' and not l.strip()[-3:] == '2.0' and not l.strip()[-3:] == '3.0':
+ raise TypeError, 'File '+`filename`+' is not VTK 2.0 format'
+ self.header = f.readline().rstrip()
+ format = f.readline().strip().lower()
+@@ -222,7 +222,7 @@
+ for i in range(2):
+ if only_structure: break
+ if not l: break
+- l = [s.strip() for s in l.lower().split(' ')]
++ l = [s.strip() for s in l.lower().split()]
+ assert len(l)==2 and l[0] in ['cell_data','point_data'], l[0]
+ data = l[0]
+ n = eval(l[1])