Ignore:
Timestamp:
09/12/06 09:53:30 (8 years ago)
Author:
xi
Message:

Fix loading an empty YAML stream.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/composer.py

    r223 r233  
    1515 
    1616    def check_node(self): 
     17        # Drop the STREAM-START event. 
     18        if self.check_event(StreamStartEvent): 
     19            self.get_event() 
     20 
    1721        # If there are more documents available? 
    1822        return not self.check_event(StreamEndEvent) 
     
    2428 
    2529    def compose_document(self): 
    26  
    27         # Drop the STREAM-START event. 
    28         if self.check_event(StreamStartEvent): 
    29             self.get_event() 
    30  
    3130        # Drop the DOCUMENT-START event. 
    3231        self.get_event() 
Note: See TracChangeset for help on using the changeset viewer.