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/resolution_calculator.py

    r7432acb rb9d74f3  
    208208        if wavelength == 0: 
    209209            msg = "Can't compute the resolution: the wavelength is zero..." 
    210             raise RuntimeError, msg 
     210            raise RuntimeError(msg) 
    211211        return self.intensity 
    212212 
     
    503503        # otherwise 
    504504        else: 
    505             raise ValueError, " Improper input..." 
     505            raise ValueError(" Improper input...") 
    506506        # get them squared 
    507507        sigma = x_comp * x_comp 
     
    766766        """ 
    767767        if len(size) < 1 or len(size) > 2: 
    768             raise RuntimeError, "The length of the size must be one or two." 
     768            raise RuntimeError("The length of the size must be one or two.") 
    769769        self.aperture.set_source_size(size) 
    770770 
     
    783783        """ 
    784784        if len(size) < 1 or len(size) > 2: 
    785             raise RuntimeError, "The length of the size must be one or two." 
     785            raise RuntimeError("The length of the size must be one or two.") 
    786786        self.aperture.set_sample_size(size) 
    787787 
     
    806806        """ 
    807807        if len(distance) < 1 or len(distance) > 2: 
    808             raise RuntimeError, "The length of the size must be one or two." 
     808            raise RuntimeError("The length of the size must be one or two.") 
    809809        self.aperture.set_sample_distance(distance) 
    810810 
     
    816816        """ 
    817817        if len(distance) < 1 or len(distance) > 2: 
    818             raise RuntimeError, "The length of the size must be one or two." 
     818            raise RuntimeError("The length of the size must be one or two.") 
    819819        self.sample.set_distance(distance) 
    820820 
     
    826826        """ 
    827827        if len(distance) < 1 or len(distance) > 2: 
    828             raise RuntimeError, "The length of the size must be one or two." 
     828            raise RuntimeError("The length of the size must be one or two.") 
    829829        self.detector.set_distance(distance) 
    830830 
     
    998998            pix_y_size = detector_pix_size[1] 
    999999        else: 
    1000             raise ValueError, " Input value format error..." 
     1000            raise ValueError(" Input value format error...") 
    10011001        # Sample to detector distance = sample slit to detector 
    10021002        # minus sample offset 
Note: See TracChangeset for help on using the changeset viewer.