Changeset 1834:91f840200ae3 in orange-bioinformatics for _bioinformatics/obiKEGG/__init__.py


Ignore:
Timestamp:
07/03/13 14:47:13 (10 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Message:

Changed the exception value from KEGG.OrganismNotFound to obiTaxonomy.UnknownSpeciesIdentifier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiKEGG/__init__.py

    r1750 r1834  
    6969) 
    7070 
    71 from .. import obiProb 
     71from .. import obiProb, obiTaxonomy 
    7272 
    7373from . import databases 
     
    9393 
    9494DEFAULT_CACHE_DIR = conf.params["cache.path"] 
    95  
    96  
    97 class OrganismNotFoundError(Exception): 
    98     pass 
    9995 
    10096 
     
    357353                name = ids.pop(0) if ids else name 
    358354            else: 
    359                 raise OrganismNotFoundError(name) 
     355                raise obiTaxonomy.UnknownSpeciesIdentifier(name) 
    360356 
    361357        try: 
    362358            return genome[name].organism_code 
    363359        except KeyError: 
    364             raise OrganismNotFoundError(name) 
     360            raise obiTaxonomy.UnknownSpeciesIdentifier(name) 
    365361 
    366362 
Note: See TracChangeset for help on using the changeset viewer.