X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FSwig%2FVTKReader.py;h=d66efe01b9f06dfec07e89e11828c0e8a5a83be9;hb=ad373daf5193daf8a8c990f5012158f38d8e74fa;hp=23933de8277432bf6bfaebafadcb8c5a09bd4b0c;hpb=3b1d77efdd048ef4aad858e96138bf79318119df;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/Swig/VTKReader.py b/src/MEDLoader/Swig/VTKReader.py index 23933de82..d66efe01b 100644 --- a/src/MEDLoader/Swig/VTKReader.py +++ b/src/MEDLoader/Swig/VTKReader.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -105,7 +105,7 @@ class PVTUReader: self._tmp=3 return if name=="PDataArray": - if self._tmp in self._data_array.keys(): + if self._tmp in self._data_array: self._data_array[self._tmp](attrs) pass return @@ -270,7 +270,7 @@ class VTURawReader: except self.NormalException as e: isOK=True fd.seek(0) - for i in xrange(e.getLineNb()): fd.readline() + for i in range(e.getLineNb()): fd.readline() ref=fd.tell()+5 pass if not isOK: @@ -285,11 +285,11 @@ class VTURawReader: def __init__(self,fileName,tim=(0.,0)): msg="The time specified in constructor as 2nd arg should be a tuple containing 2 values 1 float and 1 int !" - if type(tim)!=tuple: + if not isinstance(tim, tuple): raise Exception(msg) if len(tim)!=2: raise Exception(msg) - if type(tim[0])!=float or type(tim[1])!=int: + if not isinstance(tim[0], float) or not isinstance(tim[1], int): raise Exception(msg) self._fileName=fileName self._time=tim