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/calculator/BaseComponent.py

    r9a5097c rb9d74f3  
    143143                qdist[1].__class__.__name__ != 'ndarray': 
    144144                msg = "evalDistribution expects a list of 2 ndarrays" 
    145                 raise RuntimeError, msg 
     145                raise RuntimeError(msg) 
    146146 
    147147            # Extract qx and qy for code clarity 
     
    167167            mesg = "evalDistribution is expecting an ndarray of scalar q-values" 
    168168            mesg += " or a list [qx,qy] where qx,qy are 2D ndarrays." 
    169             raise RuntimeError, mesg 
     169            raise RuntimeError(mesg) 
    170170 
    171171 
     
    228228                    return 
    229229 
    230         raise ValueError, "Model does not contain parameter %s" % name 
     230        raise ValueError("Model does not contain parameter %s" % name) 
    231231 
    232232    def getParam(self, name): 
     
    250250                    return self.params[item] 
    251251 
    252         raise ValueError, "Model does not contain parameter %s" % name 
     252        raise ValueError("Model does not contain parameter %s" % name) 
    253253 
    254254    def getParamList(self): 
     
    294294        add 
    295295        """ 
    296         raise ValueError, "Model operation are no longer supported" 
     296        raise ValueError("Model operation are no longer supported") 
    297297    def __sub__(self, other): 
    298298        """ 
    299299        sub 
    300300        """ 
    301         raise ValueError, "Model operation are no longer supported" 
     301        raise ValueError("Model operation are no longer supported") 
    302302    def __mul__(self, other): 
    303303        """ 
    304304        mul 
    305305        """ 
    306         raise ValueError, "Model operation are no longer supported" 
     306        raise ValueError("Model operation are no longer supported") 
    307307    def __div__(self, other): 
    308308        """ 
    309309        div 
    310310        """ 
    311         raise ValueError, "Model operation are no longer supported" 
     311        raise ValueError("Model operation are no longer supported") 
    312312 
    313313 
Note: See TracChangeset for help on using the changeset viewer.