Changeset 6e50a8d in sasview


Ignore:
Timestamp:
Sep 20, 2017 7:24:29 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5a405bd
Parents:
2ecb0a5
Message:

remove unused methods from CategoryInstaller?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/CategoryInstaller.py

    r914ba0a r6e50a8d  
    2121logger = logging.getLogger(__name__) 
    2222 
    23 class CategoryInstaller: 
     23class CategoryInstaller(object): 
    2424    """ 
    2525    Class for making sure all category stuff is installed 
     
    2727    Note - class is entirely static! 
    2828    """ 
    29  
    30     def __init__(self): 
    31         """ initialization """ 
    32  
    33     @staticmethod 
    34     def _get_installed_model_dir(): 
    35         """ 
    36         returns the dir where installed_models.txt should be 
    37         """ 
    38         import sas.sascalc.dataloader.readers 
    39         return sas.sascalc.dataloader.readers.get_data_path() 
    40  
    41     @staticmethod 
    42     def _get_models_py_dir(): 
    43         """ 
    44         returns the dir where models.py should be 
    45         """ 
    46         import sas.sasgui.perspectives.fitting.models 
    47         return sas.sasgui.perspectives.fitting.models.get_model_python_path() 
    48  
    49     @staticmethod 
    50     def _get_default_cat_file_dir(): 
    51         """ 
    52         returns the dir where default_cat.j should be 
    53         """ 
    54         # The default categories file is usually found with the code, except 
    55         # when deploying using py2app (it will be in Contents/Resources), or 
    56         # py2exe (it will be in the exec dir). 
    57         import sas.sasview 
    58         cat_file = "default_categories.json" 
    59  
    60         possible_cat_file_paths = [ 
    61             os.path.join(os.path.split(sas.sasview.__file__)[0], cat_file),           # Source 
    62             os.path.join(os.path.dirname(sys.executable), '..', 'Resources', cat_file), # Mac 
    63             os.path.join(os.path.dirname(sys.executable), cat_file)                     # Windows 
    64         ] 
    65  
    66         for path in possible_cat_file_paths: 
    67             if os.path.isfile(path): 
    68                 return os.path.dirname(path) 
    69  
    70         raise RuntimeError('CategoryInstaller: Could not find folder containing default categories') 
    7129 
    7230    @staticmethod 
Note: See TracChangeset for help on using the changeset viewer.