Changeset 1439


Ignore:
Timestamp:
May 20, 2005, 3:20:56 PM (20 years ago)
Author:
duncan
Message:

simplify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py

    r1416 r1439  
    115115            msg = 'Extension %s is unknown' %ofile[-4:]
    116116            raise IOError, msg
    117     except SyntaxError:
     117    except (SyntaxError,IndexError):
    118118            msg = 'File could not be opened'
    119             raise IOError, msg
    120     except IndexError:
    121             msg = 'File could not be opened'
    122             raise IOError, msg
    123        
     119            raise IOError, msg       
    124120    return dict
    125121
     
    10111007                points_dict = _read_xya_file(fd, delimiter)
    10121008            fd.close()
    1013         except SyntaxError:
    1014             fd.close()   
    1015             msg = 'File could not be opened'
    1016             raise IOError, msg
    1017         except IndexError:
    1018             fd.close()   
    1019             msg = 'File could not be opened'
    1020             raise IOError, msg
    1021         except ValueError: # thrown by geo_ref, read ASCII
     1009        except (IndexError,ValueError,SyntaxError):
    10221010            fd.close()   
    10231011            msg = 'File could not be opened'
Note: See TracChangeset for help on using the changeset viewer.