Changeset 1737:729925f75820 in orange-bioinformatics for _bioinformatics/obiKEGG/entry/parser.py


Ignore:
Timestamp:
04/05/13 19:43:37 (13 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

KEGG bug fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiKEGG/entry/parser.py

    r1733 r1737  
    137137        Split the section title from the rest of the line 
    138138        """ 
    139         title, rest = line.split(" ", 1) 
     139        try: 
     140            title, rest = line.split(" ", 1) 
     141        except ValueError: 
     142            # no contents, only section title 
     143            title = line.rstrip() 
     144            rest = "" 
    140145        rest = rest.lstrip(" ") 
    141146        return title, rest 
Note: See TracChangeset for help on using the changeset viewer.