Ignore:
Timestamp:
Sep 20, 2017 7:26:17 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:
1693141
Parents:
6e50a8d
Message:

bundle resource files by directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/__init__.py

    r959eb01 r5a405bd  
    1818    path = os.path.dirname(__file__) 
    1919    #Look for maximum n_dir up of the current dir to find media 
    20     
     20 
    2121    #for i in range(n_dir): 
    2222    i = 0 
     
    3030             return media_path 
    3131        i += 1 
    32     
     32 
    3333    raise RuntimeError('Could not find calculator media files') 
    3434 
     
    3636    """ 
    3737    Return the data files associated with media calculator. 
    38      
     38 
    3939    The format is a list of (directory, [files...]) pairs which can be 
    4040    used directly in setup(...,data_files=...) for setup.py. 
     
    4242    """ 
    4343    data_files = [] 
    44     path = get_data_path(media="media") 
    45     for f in findall(path): 
    46         data_files.append(('media/calculator_media', [f])) 
     44    data_files.append(('media/calculator_media', findall(get_data_path("media")))) 
    4745    return data_files 
Note: See TracChangeset for help on using the changeset viewer.