Changes in / [a0243f7:bf94e6e] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    rf9c8474 r6cbdcd4  
    169169 
    170170import sys 
    171 from os import environ 
    172 from os.path import abspath, dirname, join as joinpath, exists, getmtime, sep 
     171from os.path import abspath, dirname, join as joinpath, exists, getmtime 
    173172import re 
    174173import string 
     
    901900        kernel_module = load_custom_kernel_module(model_name) 
    902901    else: 
    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 
     902        from sasmodels import models 
     903        __import__('sasmodels.models.'+model_name) 
     904        kernel_module = getattr(models, model_name, None) 
    916905    return kernel_module 
    917906 
Note: See TracChangeset for help on using the changeset viewer.