Changeset 7970:a10761745501 in orange


Ignore:
Timestamp:
06/02/11 23:07:10 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
3afc736bb95a338a66ff7eb2c70434b4f849bbf3
Message:

Raise Error instead of returning None.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/network/readwrite.py

    r7968 r7970  
    2727     
    2828    if not os.path.isfile(path): 
    29         return None 
     29        raise OSError('File %s does not exist.' % path) 
    3030     
    3131    root, ext = os.path.splitext(path) 
    3232    if not ext in supported: 
    33         return None 
     33        raise ValueError('Extension %s is not supported.' % ext) 
    3434     
    3535    if ext == '.net': 
Note: See TracChangeset for help on using the changeset viewer.