You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pyvtk/files/pyvtk-0.4.74.patch

21 lines
972 B

--- 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])