Changes in / [bf94e6e:a0243f7] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
r6cbdcd4 rf9c8474 169 169 170 170 import sys 171 from os.path import abspath, dirname, join as joinpath, exists, getmtime 171 from os import environ 172 from os.path import abspath, dirname, join as joinpath, exists, getmtime, sep 172 173 import re 173 174 import string … … 900 901 kernel_module = load_custom_kernel_module(model_name) 901 902 else: 902 from sasmodels import models 903 __import__('sasmodels.models.'+model_name) 904 kernel_module = getattr(models, model_name, None) 903 try: 904 from sasmodels import models 905 __import__('sasmodels.models.'+model_name) 906 kernel_module = getattr(models, model_name, None) 907 except ImportError: 908 # If the model isn't a built in model, try the plugin directory 909 plugin_path = environ.get('SAS_MODELPATH', None) 910 if plugin_path is not None: 911 file_name = model_name.split(sep)[-1] 912 model_name = plugin_path + sep + file_name + ".py" 913 kernel_module = load_custom_kernel_module(model_name) 914 else: 915 raise 905 916 return kernel_module 906 917
Note: See TracChangeset
for help on using the changeset viewer.