Changeset a01c743 in sasview


Ignore:
Timestamp:
Jan 12, 2011 5:05:18 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
67c7e89
Parents:
992199e
Message:

raise an error when nothing can be read remove return none

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/readers/cansas_reader.py

    ra7a5886 ra01c743  
    170170            raise RuntimeError, "%s is not a file" % path 
    171171        # Return output consistent with the loader's api 
    172         if len(output)==0: 
    173             return None 
    174         elif len(output)==1: 
     172        if len(output) == 0: 
     173            #cannot return none when it cannot read  
     174            #return None 
     175            raise RuntimeError, "%s cannot be read \n" % path 
     176        elif len(output) == 1: 
    175177            return output[0] 
    176178        else: 
Note: See TracChangeset for help on using the changeset viewer.