Ignore:
Timestamp:
Sep 15, 2016 8:33:57 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
6d4cf68
Parents:
1e56da1
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/15/16 10:01:36)
git-committer:
Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
Message:

Fix error message shown when loading folder fails (fixes #614)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    r1e56da1 r813220f  
    173173        log_msg = '' 
    174174        output = {} 
    175         any_error = False 
    176175        data_error = False 
    177176        error_message = "" 
    178177 
    179178        for p_file in path: 
     179            file_error = False 
    180180            info = "info" 
    181181            basename = os.path.basename(p_file) 
    182182            _, extension = os.path.splitext(basename) 
    183183            if extension.lower() in EXTENSIONS: 
    184                 any_error = True 
    185184                info = "error" 
    186185                log_msg = "Data Loader cannot " 
     
    211210            except: 
    212211                logging.error(sys.exc_value) 
    213                 any_error = True 
    214             if any_error: 
     212                file_error = True 
     213            if file_error: 
    215214                error = "Error: " + str(sys.exc_info()[1]) 
    216215                error += " while loading file: %s" % str(basename) 
     
    228227                info = "error" 
    229228 
    230         if any_error or error_message: 
     229        if error_message != "": 
    231230            self.load_update(output=output, message=error_message, info=info) 
    232231        else: 
Note: See TracChangeset for help on using the changeset viewer.