Changeset a67ec83 in sasview for installers/setup_mac.py


Ignore:
Timestamp:
May 2, 2017 11:02:06 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:
13fe3be
Parents:
c6bdb3b
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • installers/setup_mac.py

    red03b99 ra67ec83  
    135135    """ 
    136136    try: 
    137         list = [] 
     137        extensions = [] 
    138138        EXCEPTION_LIST = ['*', '.', ''] 
    139139        from sas.sascalc.dataloader.loader import Loader 
     
    142142            #['All (*.*)|*.*'] 
    143143            file_type, ext = string.split(item, "|*.", 1) 
    144             if ext.strip() not in EXCEPTION_LIST and ext.strip() not in list: 
    145                 list.append(ext) 
    146     except: 
     144            if ext.strip() not in EXCEPTION_LIST and ext.strip() not in extensions: 
     145                extensions.append(ext) 
     146    except Exception: 
    147147        pass 
    148148    try: 
    149149        file_type, ext = string.split(local_config.APPLICATION_WLIST, "|*.", 1) 
    150         if ext.strip() not in EXCEPTION_LIST and ext.strip() not in list: 
    151             list.append(ext) 
    152     except: 
     150        if ext.strip() not in EXCEPTION_LIST and ext.strip() not in extensions: 
     151            extensions.append(ext) 
     152    except Exception: 
    153153        pass 
    154154    try: 
    155155        for item in local_config.PLUGINS_WLIST: 
    156156            file_type, ext = string.split(item, "|*.", 1) 
    157             if ext.strip() not in EXCEPTION_LIST and ext.strip() not in list: 
    158                 list.append(ext) 
    159     except: 
     157            if ext.strip() not in EXCEPTION_LIST and ext.strip() not in extensions: 
     158                extensions.append(ext) 
     159    except Exception: 
    160160        pass 
    161161 
    162     return list 
     162    return extensions 
    163163 
    164164EXTENSIONS_LIST = find_extension() 
     
    177177    if os.path.isfile(libxml_path_test): 
    178178        libxml_path = libxml_path_test 
    179 if libxml_path == None: 
     179if libxml_path is None: 
    180180    raise RuntimeError, "Could not find libxml2 on the system" 
    181181 
Note: See TracChangeset for help on using the changeset viewer.