Changeset f1e409f in sasview


Ignore:
Timestamp:
Apr 11, 2017 4:26:08 AM (8 years ago)
Author:
Adam Washington <adam.washington@…>
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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
56a282c
Parents:
2a0d9ad
git-author:
Adam Washington <adam.washington@…> (04/11/17 04:13:59)
git-committer:
Adam Washington <adam.washington@…> (04/11/17 04:26:08)
Message:

Change "dir" to "directory" in _findModels

The dir variable shadows the builtin dir function, increasing the
difficulty of debugging this function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/models.py

    r2a0d9ad rf1e409f  
    166166    """ 
    167167    # List of plugin objects 
    168     dir = find_plugins_dir() 
     168    directory = find_plugins_dir() 
    169169    # Go through files in plug-in directory 
    170     if not os.path.isdir(dir): 
    171         msg = "SasView couldn't locate Model plugin folder %r." % dir 
     170    if not os.path.isdir(directory): 
     171        msg = "SasView couldn't locate Model plugin folder %r." % directory 
    172172        logger.warning(msg) 
    173173        return {} 
    174174 
    175     plugin_log("looking for models in: %s" % str(dir)) 
    176     # compile_file(dir)  #always recompile the folder plugin 
    177     logger.info("plugin model dir: %s" % str(dir)) 
     175    plugin_log("looking for models in: %s" % str(directory)) 
     176    # compile_file(directory)  #always recompile the folder plugin 
     177    logger.info("plugin model dir: %s" % str(directory)) 
    178178 
    179179    plugins = {} 
    180     for filename in os.listdir(dir): 
     180    for filename in os.listdir(directory): 
    181181        name, ext = os.path.splitext(filename) 
    182182        if ext == '.py' and not name == '__init__': 
    183             path = os.path.abspath(os.path.join(dir, filename)) 
     183            path = os.path.abspath(os.path.join(directory, filename)) 
    184184            try: 
    185185                model = load_custom_model(path) 
Note: See TracChangeset for help on using the changeset viewer.