Changeset 31c5b58 in sasview for src/sas/qtgui/GuiUtils.py
- Timestamp:
- Nov 25, 2016 6:56:41 AM (7 years ago)
- Branches:
- 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
- Children:
- 3968752
- Parents:
- 14d9c7b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiUtils.py
re4676c8 r31c5b58 46 46 if os.path.isfile(os.path.join(app_path, "custom_config.py")): 47 47 app_path = os.path.abspath(app_path) 48 logging.info("Using application path: %s", app_path)48 #logging.info("Using application path: %s", app_path) 49 49 return app_path 50 50 51 51 # Next, try the current working directory 52 52 if os.path.isfile(os.path.join(os.getcwd(), "custom_config.py")): 53 logging.info("Using application path: %s", os.getcwd())53 #logging.info("Using application path: %s", os.getcwd()) 54 54 return os.path.abspath(os.getcwd()) 55 55 … … 58 58 # clean all these module variables and put them into a config class 59 59 # that can be passed by sasview.py. 60 logging.info(sys.executable)61 logging.info(str(sys.argv))60 #logging.info(sys.executable) 61 #logging.info(str(sys.argv)) 62 62 from sas import sasview as sasview 63 63 app_path = os.path.dirname(sasview.__file__) 64 logging.info("Using application path: %s", app_path)64 #logging.info("Using application path: %s", app_path) 65 65 return app_path 66 66 … … 84 84 config_module = imp.load_module(confg_file, fObj, path_config, descr) 85 85 except ImportError: 86 logging.error("Error loading %s/%s: %s" % (path, confg_file, sys.exc_value)) 86 pass 87 #logging.error("Error loading %s/%s: %s" % (path, confg_file, sys.exc_value)) 87 88 finally: 88 89 if fObj is not None: 89 90 fObj.close() 90 logging.info("GuiManager loaded %s/%s" % (path, confg_file))91 #logging.info("GuiManager loaded %s/%s" % (path, confg_file)) 91 92 return config_module 92 93 … … 100 101 # application or in the installation directory 101 102 config = _find_local_config('local_config', PATH_APP) 103 102 104 if config is None: 103 105 config = _find_local_config('local_config', os.getcwd()) … … 105 107 # Didn't find local config, load the default 106 108 import sas.sasgui.guiframe.config as config 107 logging.info("using default local_config")109 #logging.info("using default local_config") 108 110 else: 109 logging.info("found local_config in %s", os.getcwd()) 111 pass 112 #logging.info("found local_config in %s", os.getcwd()) 110 113 else: 111 logging.info("found local_config in %s", PATH_APP) 114 pass 115 #logging.info("found local_config in %s", PATH_APP) 112 116 113 117 … … 119 123 if custom_config is None: 120 124 msgConfig = "Custom_config file was not imported" 121 logging.info(msgConfig)125 #logging.info(msgConfig) 122 126 else: 123 logging.info("using custom_config in %s", os.getcwd()) 127 pass 128 #logging.info("using custom_config in %s", os.getcwd()) 124 129 else: 125 logging.info("using custom_config from %s", c_conf_dir) 130 pass 131 #logging.info("using custom_config from %s", c_conf_dir) 126 132 127 133 #read some constants from config … … 350 356 msg = "Unable to find min/max of \n data named %s" % \ 351 357 data.filename 352 logging.error(msg)358 #logging.error(msg) 353 359 raise ValueError, msg 354 360
Note: See TracChangeset
for help on using the changeset viewer.