Changeset b9d74f3 in sasview for src/sas/sasgui/perspectives/invariant/invariant_panel.py
- Timestamp:
- Apr 20, 2017 6:29:34 AM (8 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/invariant/invariant_panel.py
r7432acb rb9d74f3 318 318 background = self.background_tcl.GetValue().lstrip().rstrip() 319 319 if background == "": 320 raise ValueError , "Need a background"320 raise ValueError("Need a background") 321 321 if check_float(self.background_tcl): 322 322 return float(background) 323 323 else: 324 324 msg = "Receive invalid value for background : %s" % (background) 325 raise ValueError , msg325 raise ValueError(msg) 326 326 327 327 def get_scale(self): … … 331 331 scale = self.scale_tcl.GetValue().lstrip().rstrip() 332 332 if scale == "": 333 raise ValueError , "Need a background"333 raise ValueError("Need a background") 334 334 if check_float(self.scale_tcl): 335 335 if float(scale) <= 0.0: … … 337 337 self.scale_tcl.Refresh() 338 338 msg = "Receive invalid value for scale: %s" % (scale) 339 raise ValueError , msg339 raise ValueError(msg) 340 340 return float(scale) 341 341 else: 342 raise ValueError , "Receive invalid value for scale : %s" % (scale)342 raise ValueError("Receive invalid value for scale : %s" % (scale)) 343 343 344 344 def get_contrast(self): … … 865 865 except: 866 866 logger.error(sys.exc_value) 867 raise ValueError , "No such bookmark exists"867 raise ValueError("No such bookmark exists") 868 868 869 869 # set the parameters
Note: See TracChangeset
for help on using the changeset viewer.