Changeset 494f151 in sasview for setup.py


Ignore:
Timestamp:
Dec 22, 2011 1:50:18 PM (8 years ago)
Author:
Jae Cho <jhjcho@…>
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:
5e56f89
Parents:
b30ed8f
Message:

used try except method to delete the files in .sansview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    rb30ed8f r494f151  
    4949if os.path.isdir(sans_dir): 
    5050    f_path = os.path.join(sans_dir, "sansview.log") 
    51     if os.path.isfile(f_path): 
    52         os.remove(f_path) 
    53     f_path = os.path.join(sans_dir, 'config', "custom_config.py") 
    54     if os.path.isfile(f_path): 
    55         os.remove(f_path) 
    56     f_path = os.path.join(sans_dir, 'plugin_models') 
    57     if os.path.isdir(f_path): 
    58         for file in os.listdir(f_path):  
    59             if file in plugin_model_list: 
    60                 file_path =  os.path.join(f_path, file) 
    61                 os.remove(file_path) 
     51    try: 
     52        if os.path.isfile(f_path): 
     53            os.remove(f_path) 
     54        f_path = os.path.join(sans_dir, 'config', "custom_config.py") 
     55        if os.path.isfile(f_path): 
     56            os.remove(f_path) 
     57        f_path = os.path.join(sans_dir, 'plugin_models') 
     58        if os.path.isdir(f_path): 
     59            for file in os.listdir(f_path):  
     60                if file in plugin_model_list: 
     61                    file_path =  os.path.join(f_path, file) 
     62                    os.remove(file_path) 
     63    except: 
     64        pass 
    6265 
    6366enable_openmp = True                     
Note: See TracChangeset for help on using the changeset viewer.