Changeset 47be5a1 in sasview for src/sas/_config.py
- Timestamp:
- Nov 2, 2018 1:04:28 PM (5 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
- Children:
- 93b34cc
- Parents:
- d742b56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/_config.py
rb963b20 r47be5a1 94 94 logger.error("Could not copy default custom config.") 95 95 96 custom_config = load_custom_config(path) 97 96 98 #Adding SAS_OPENCL if it doesn't exist in the config file 97 99 # - to support backcompability 98 if not "SAS_OPENCL" in open(path).read(): 100 if not hasattr(custom_config, "SAS_OPENCL"): 101 custom_config.SAS_OPENCL = None 99 102 try: 100 103 open(config_file, "a+").write("SAS_OPENCL = \"None\"\n") … … 102 105 logger.error("Could not update custom config with SAS_OPENCL.") 103 106 104 custom_config = load_custom_config(path)105 107 return custom_config 106 107 108 108 109 def load_custom_config(path):
Note: See TracChangeset
for help on using the changeset viewer.