Changeset b9d74f3 in sasview for src/sas/sasgui/perspectives/pr


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

Location:
src/sas/sasgui/perspectives/pr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/pr/inversion_panel.py

    r7432acb rb9d74f3  
    854854                message += "than the number of points" 
    855855                wx.PostEvent(self._manager.parent, StatusEvent(status=message)) 
    856                 raise ValueError, message 
     856                raise ValueError(message) 
    857857            self.nfunc_ctl.SetBackgroundColour(wx.WHITE) 
    858858            self.nfunc_ctl.Refresh() 
  • src/sas/sasgui/perspectives/pr/inversion_state.py

    r7432acb rb9d74f3  
    235235            msg = "InversionState no longer supports non-CanSAS" 
    236236            msg += " format for P(r) files" 
    237             raise RuntimeError, msg 
     237            raise RuntimeError(msg) 
    238238 
    239239        if node.get('version') and node.get('version') == '1.0': 
     
    478478                        output.append(sas_entry) 
    479479        else: 
    480             raise RuntimeError, "%s is not a file" % path 
     480            raise RuntimeError("%s is not a file" % path) 
    481481 
    482482        # Return output consistent with the loader's api 
     
    522522            msg = "The cansas writer expects a Data1D " 
    523523            msg += "instance: %s" % str(datainfo.__class__.__name__) 
    524             raise RuntimeError, msg 
     524            raise RuntimeError(msg) 
    525525 
    526526        # Create basic XML document 
  • src/sas/sasgui/perspectives/pr/pr.py

    r7432acb rb9d74f3  
    149149                msg = "Pr.set_state: datainfo parameter cannot " 
    150150                msg += "be None in standalone mode" 
    151                 raise RuntimeError, msg 
     151                raise RuntimeError(msg) 
    152152 
    153153            # Ensuring that plots are coordinated correctly 
     
    450450        # Notify the user if we could not read the file 
    451451        if dataread is None: 
    452             raise RuntimeError, "Invalid data" 
     452            raise RuntimeError("Invalid data") 
    453453 
    454454        x = None 
     
    470470                if dataread is None: 
    471471                    return x, y, err 
    472                 raise RuntimeError, "This tool can only read 1D data" 
     472                raise RuntimeError("This tool can only read 1D data") 
    473473 
    474474        self._current_file_data.x = x 
     
    849849                status = "Problem reading data: %s" % sys.exc_value 
    850850                wx.PostEvent(self.parent, StatusEvent(status=status)) 
    851                 raise RuntimeError, status 
     851                raise RuntimeError(status) 
    852852 
    853853            # If the file contains nothing, just return 
    854854            if pr is None: 
    855                 raise RuntimeError, "Loaded data is invalid" 
     855                raise RuntimeError("Loaded data is invalid") 
    856856 
    857857            self.pr = pr 
     
    903903            msg = "pr.save_data: the data being saved is not a" 
    904904            msg += " sas.data_info.Data1D object" 
    905             raise RuntimeError, msg 
     905            raise RuntimeError(msg) 
    906906 
    907907    def setup_plot_inversion(self, alpha, nfunc, d_max, q_min=None, q_max=None, 
Note: See TracChangeset for help on using the changeset viewer.