Ignore:
Timestamp:
Mar 10, 2017 6:41:23 AM (7 years ago)
Author:
krzywon
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
62b9793
Parents:
09f2328
Message:

Send data to cansas nexus reader if file extension is not recognized.

File:
1 edited

Legend:

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

    rb699768 rd0764bf  
    3131from readers import ascii_reader 
    3232from readers import cansas_reader 
     33from readers import cansas_reader_HDF5 
    3334 
    3435class Registry(ExtensionRegistry): 
     
    7374                return ascii_loader.read(path) 
    7475            except: 
    75                 cansas_loader = cansas_reader.Reader() 
    76                 return cansas_loader.read(path) 
     76                try: 
     77                    cansas_loader = cansas_reader.Reader() 
     78                    return cansas_loader.read(path) 
     79                except: 
     80                    cansas_nexus_loader = cansas_reader_HDF5.Reader() 
     81                    return cansas_nexus_loader.read(path) 
    7782 
    7883    def find_plugins(self, dir): 
Note: See TracChangeset for help on using the changeset viewer.