Changeset 3dd7cce in sasview


Ignore:
Timestamp:
Jul 9, 2008 4:22:54 PM (16 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:
9cd84ee
Parents:
d22da51
Message:

passing error_conditions test

Location:
DataLoader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/loader.py

    rd22da51 r3dd7cce  
    171171            except: 
    172172                 
    173                 raise ValueError, "Unknown file type '%s'"%ext 
     173                raise RuntimeError, "Unknown file type '%s'"%ext 
    174174                 
    175175        
  • DataLoader/plugins/tiff_reader.py

    rd22da51 r3dd7cce  
    4040        Example data manipulation 
    4141    """ 
    42     
    4342    ## File type 
    4443    type = [] 
     
    7675            Z = None 
    7776         
    78              
    79             im = Image.open(filename) 
    80              
     77            try: 
     78                im = Image.open(filename) 
     79            except : 
     80                raise  RuntimeError,"cannot open %s"%(filename) 
    8181            # Detector size should be 128x128, the file is 190x190 
    8282            print "-> Image size:", im.size, im.format, im.mode 
  • DataLoader/readers/tiff_reader.py

    r73b1c72 r3dd7cce  
    7575            Z = None 
    7676         
    77              
    78             im = Image.open(filename) 
    79              
     77            try: 
     78                im = Image.open(filename) 
     79            except : 
     80                raise  RuntimeError,"cannot open %s"%(filename) 
    8081            # Detector size should be 128x128, the file is 190x190 
    8182            print "-> Image size:", im.size, im.format, im.mode 
Note: See TracChangeset for help on using the changeset viewer.