Ignore:
Timestamp:
Apr 20, 2017 6:29:34 AM (8 years ago)
Author:
andyfaff
Children:
0cc77d8
Parents:
b636dfc5
git-author:
Andrew Nelson <andyfaff@…> (04/20/17 06:25:57)
git-committer:
Andrew Nelson <andyfaff@…> (04/20/17 06:29:34)
Message:

MAINT: use raise Exception() not raise Exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/hfir1d_reader.py

    r959eb01 rb9d74f3  
    4949                    input_f = open(path,'r') 
    5050                except: 
    51                     raise  RuntimeError, "hfir1d_reader: cannot open %s" % path 
     51                    raise  RuntimeError("hfir1d_reader: cannot open %s" % path) 
    5252                buff = input_f.read() 
    5353                lines = buff.split('\n') 
     
    9999                if not len(y) == len(dy): 
    100100                    msg = "hfir1d_reader: y and dy have different length" 
    101                     raise RuntimeError, msg 
     101                    raise RuntimeError(msg) 
    102102                if not len(x) == len(dx): 
    103103                    msg = "hfir1d_reader: x and dx have different length" 
    104                     raise RuntimeError, msg 
     104                    raise RuntimeError(msg) 
    105105 
    106106                # If the data length is zero, consider this as 
    107107                # though we were not able to read the file. 
    108108                if len(x) == 0: 
    109                     raise RuntimeError, "hfir1d_reader: could not load file" 
     109                    raise RuntimeError("hfir1d_reader: could not load file") 
    110110                
    111111                output.x = x 
     
    126126                return output 
    127127        else: 
    128             raise RuntimeError, "%s is not a file" % path 
     128            raise RuntimeError("%s is not a file" % path) 
    129129        return None 
Note: See TracChangeset for help on using the changeset viewer.