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/pr/fit/expression.py

    r9a5097c rb9d74f3  
    237237        if independent == emptyset: 
    238238            cycleset = ", ".join(str(s) for s in left) 
    239             raise ValueError,"Cyclic dependencies amongst %s"%cycleset 
     239            raise ValueError("Cyclic dependencies amongst %s"%cycleset) 
    240240 
    241241        # The possibly resolvable items are those that depend on the independents 
     
    265265        n.sort() 
    266266        items = list(items); items.sort() 
    267         raise Exception,"%s expect %s to contain %s for %s"%(msg,n,items,pairs) 
     267        raise Exception("%s expect %s to contain %s for %s"%(msg,n,items,pairs)) 
    268268    for lo,hi in pairs: 
    269269        if lo in n and hi in n and n.index(lo) >= n.index(hi): 
    270             raise Exception,"%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs) 
     270            raise Exception("%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs)) 
    271271 
    272272def test_deps(): 
     
    288288    try: n = order_dependencies(pairs) 
    289289    except ValueError: pass 
    290     else: raise Exception,"test3 expect ValueError exception for %s"%(pairs,) 
     290    else: raise Exception("test3 expect ValueError exception for %s"%(pairs,)) 
    291291 
    292292    # large test for gross speed check 
Note: See TracChangeset for help on using the changeset viewer.