Changeset 9592c6f in sasview for src/sas


Ignore:
Timestamp:
Feb 6, 2018 11:36:52 AM (7 years ago)
Author:
krzywon
Children:
d1520fc
Parents:
ef63dd9
Message:

More explicit error message when the loader sees a deprecated data set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/loader.py

    ref63dd9 r9592c6f  
    5555 
    5656        # Deprecated extensions 
    57         self.deprecated_extensions = ['.asc', '.ASC', '.nxs', '.NXS'] 
     57        self.deprecated_extensions = ['.asc', '.nxs'] 
    5858 
    5959        # Creation time, for testing 
     
    7676        # Gets set to a string if the file has an associated reader that fails 
    7777        msg_from_reader = None 
    78         extlist = [ext for ext in self.deprecated_extensions if path.endswith(ext)] 
     78        extlist = [ext for ext in self.deprecated_extensions if 
     79                   path.lower().endswith(ext)] 
    7980        if extlist: 
    80             msg = ("\rThe file you are attempting to load, {}, is no " 
    81                    "longer loadable into SasView. Please use data in Q space." 
     81            msg = ("\rThe file you are attempting to load, {}, is no longer " 
     82                   "loadable by SasView. The file extension suggests the data " 
     83                   "set is in pixel space. SasView will no longer reduce raw da" 
     84                   "ta sets. Please provide fully reduced data in Q space. No a" 
     85                   "ttempt to load the data has been made." 
    8286                   .format(path)) 
    8387            raise RuntimeError(msg) 
Note: See TracChangeset for help on using the changeset viewer.