Changeset 2941 for inundation/load_mesh
- Timestamp:
- May 23, 2006, 9:11:57 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/load_mesh/loadASCII.py
r2888 r2941 82 82 from os.path import splitext 83 83 84 from coordinate_transforms.geo_reference import Geo_reference,TITLE 84 from coordinate_transforms.geo_reference import Geo_reference,TITLE, TitleError 85 85 86 86 import exceptions … … 105 105 msg = 'Extension %s is unknown' %ofile[-4:] 106 106 raise IOError, msg 107 except ( SyntaxError,IndexError, ValueError): #FIXME No test for ValueError107 except (TitleError,SyntaxError,IndexError, ValueError): #FIXME No test for ValueError 108 108 msg = 'File could not be opened' 109 109 raise IOError, msg … … 993 993 994 994 #FIXME (Ole): This function should really return a Geospatial_data object. #FIXME (DSG): Do you know it does, in the points dic? 995 #No. Where this function is used, geospatial objects should be used. 995 996 996 997 if ofile[-4:]== ".xya": … … 1000 1001 fd = open(ofile) 1001 1002 points_dict = _read_xya_file(fd, ',') 1002 except SyntaxError:1003 except TitleError: # this is catching the error thrown by geo_ref 1003 1004 fd.close() 1004 1005 fd = open(ofile) … … 1009 1010 fd.close() 1010 1011 except (IndexError,ValueError,SyntaxError): 1011 fd.close() 1012 fd.close() 1013 msg = 'Could not open file %s ' %ofile 1014 raise IOError, msg 1015 except TitleError: 1016 print "reclassifying title error" 1017 fd.close() 1012 1018 msg = 'Could not open file %s ' %ofile 1013 1019 raise IOError, msg
Note: See TracChangeset
for help on using the changeset viewer.