Changeset a97003e in sasview


Ignore:
Timestamp:
Dec 15, 2011 3:43:10 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
095b6ec
Parents:
13bc1b3a
Message:

Re #3 Fixing build for sansview app

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_manager.py

    r5376e03 ra97003e  
    5151    """     
    5252    config_module = None 
     53    fObj = None 
    5354    try: 
    5455        fObj, path_config, descr = imp.find_module(file, [path]) 
     
    5758        pass 
    5859    finally: 
    59         if fObj: 
     60        if fObj is not None: 
    6061            fObj.close() 
    6162    return config_module 
    62                
    63 try: 
    64     path = PATH_APP 
    65     config = _find_local_config('local_config', path) 
    66     if config is None: 
    67         path, _ = os.path.split(PATH_APP) 
    68         config = _find_local_config('local_config', path) 
    69 except: 
    70     # Didn't find local config, load the default  
    71     import sans.guiframe.config as config 
    72   
     63 
     64# Read in the local config, which can either be with the main 
     65# application or in the installation directory 
     66config = _find_local_config('local_config', PATH_APP) 
     67if config is None: 
     68    config = _find_local_config('local_config', os.getcwd()) 
    7369if config is None: 
    7470    # Didn't find local config, load the default  
    75     import sans.guiframe.config as config 
     71    import sans.guiframe.config as config           
    7672        
    77 custom_config = None 
    78 try: 
    79     path = PATH_APP 
    80     custom_config = _find_local_config('custom_config', path) 
    81     if custom_config is None: 
    82         path, _ = os.path.split(PATH_APP) 
    83         custom_config = _find_local_config('custom_config', path) 
    84 except: 
     73 
     74custom_config = _find_local_config('custom_config', PATH_APP) 
     75if custom_config is None: 
     76    custom_config = _find_local_config('custom_config', os.getcwd()) 
     77if custom_config is None: 
    8578    msg = "Custom_config file was not imported" 
    8679    logging.info(msg) 
Note: See TracChangeset for help on using the changeset viewer.