- Timestamp:
- Aug 31, 2017 2:45:51 PM (7 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 460d3a1
- Parents:
- a2a1c20
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasview/sasview.py
r4b26bc14 rb39d32d5 50 50 self.gui.add_perspective(fitting_plug) 51 51 except Exception: 52 logger.error("%s: could not find Fitting plug-in module" %APP_NAME)52 logger.error("%s: could not find Fitting plug-in module", APP_NAME) 53 53 logger.error(traceback.format_exc()) 54 54 … … 58 58 pr_plug = module.Plugin() 59 59 self.gui.add_perspective(pr_plug) 60 except :61 logger.error("%s: could not find P(r) plug-in module" %APP_NAME)60 except Exception: 61 logger.error("%s: could not find P(r) plug-in module", APP_NAME) 62 62 logger.error(traceback.format_exc()) 63 63 … … 67 67 invariant_plug = module.Plugin() 68 68 self.gui.add_perspective(invariant_plug) 69 except Exception as e:70 logger.error("%s: could not find Invariant plug-in module" % \71 69 except Exception: 70 logger.error("%s: could not find Invariant plug-in module", 71 APP_NAME) 72 72 logger.error(traceback.format_exc()) 73 73 … … 77 77 corfunc_plug = module.Plugin() 78 78 self.gui.add_perspective(corfunc_plug) 79 except :79 except Exception: 80 80 logger.error("Unable to load corfunc module") 81 81 … … 85 85 calculator_plug = module.Plugin() 86 86 self.gui.add_perspective(calculator_plug) 87 except :88 logger.error("%s: could not find Calculator plug-in module" % \89 87 except Exception: 88 logger.error("%s: could not find Calculator plug-in module", 89 APP_NAME) 90 90 logger.error(traceback.format_exc()) 91 91 … … 95 95 converter_plug = module.Plugin() 96 96 self.gui.add_perspective(converter_plug) 97 except :98 logger.error("%s: could not find File Converter plug-in module" % \99 97 except Exception: 98 logger.error("%s: could not find File Converter plug-in module", 99 APP_NAME) 100 100 logger.error(traceback.format_exc()) 101 101 … … 132 132 WX_ENV_VAR = "SASVIEW_WX_VERSION" 133 133 if WX_ENV_VAR in os.environ: 134 logger.info("You have set the %s environment variable to %s." % \135 (WX_ENV_VAR, os.environ[WX_ENV_VAR]))134 logger.info("You have set the %s environment variable to %s.", 135 WX_ENV_VAR, os.environ[WX_ENV_VAR]) 136 136 import wxversion 137 137 if wxversion.checkInstalled(os.environ[WX_ENV_VAR]): 138 logger.info("Version %s of wxPython is installed, so using that version." % os.environ[WX_ENV_VAR]) 138 logger.info("Version %s of wxPython is installed, so using that version.", 139 os.environ[WX_ENV_VAR]) 139 140 wxversion.select(os.environ[WX_ENV_VAR]) 140 141 else: 141 logger.error("Version %s of wxPython is not installed, so using default version." % os.environ[WX_ENV_VAR]) 142 logger.error("Version %s of wxPython is not installed, so using default version.", 143 os.environ[WX_ENV_VAR]) 142 144 else: 143 logger.info("You have not set the %s environment variable, so using default version of wxPython." % WX_ENV_VAR) 145 logger.info("You have not set the %s environment variable, so using default version of wxPython.", 146 WX_ENV_VAR) 144 147 145 148 import wx 146 149 147 150 try: 148 logger.info("Wx version: %s" %wx.__version__)149 except :151 logger.info("Wx version: %s", wx.__version__) 152 except AttributeError: 150 153 logger.error("Wx version: error reading version") 151 154 … … 197 200 except ImportError: 198 201 import code 199 code.interact( )202 code.interact(local={'exit': sys.exit}) 200 203 else: 201 204 # Run sasview as a python script interpreter
Note: See TracChangeset
for help on using the changeset viewer.