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/data_util/registry.py

    rb699768 rb9d74f3  
    105105        # Raise an error if there are no matching extensions 
    106106        if len(loaders) == 0: 
    107             raise ValueError, "Unknown file type for "+path 
     107            raise ValueError("Unknown file type for "+path) 
    108108        # All done 
    109109        return loaders 
     
    159159    try:  reg.load('hello.cx2') 
    160160    except CxError: pass # correct failure 
    161     else: raise AssertError,"Incorrect error on load failure" 
     161    else: raise AssertError("Incorrect error on load failure") 
    162162    # Make sure the case of no loaders fails correctly 
    163163    try: reg.load('hello.missing') 
    164164    except ValueError,msg: 
    165165        assert str(msg)=="Unknown file type for hello.missing",'Message: <%s>'%(msg) 
    166     else: raise AssertError,"No error raised for missing extension" 
     166    else: raise AssertError("No error raised for missing extension") 
    167167    assert reg.formats() == ['new_cx'] 
    168168    assert reg.extensions() == ['.cx','.cx.gz','.cx1','.cx1.gz','.cx2','.gz'] 
Note: See TracChangeset for help on using the changeset viewer.