Ignore:
Timestamp:
12/29/08 23:02:04 (6 years ago)
Author:
xi
Message:

Handle the encoding of input and output streams in a uniform way.

File:
1 edited

Legend:

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

    r328 r333  
    155155    def expect_stream_start(self): 
    156156        if isinstance(self.event, StreamStartEvent): 
    157             if self.event.encoding: 
     157            if self.event.encoding and not getattr(self.stream, 'encoding', None): 
    158158                self.encoding = self.event.encoding 
    159159            self.write_stream_start() 
Note: See TracChangeset for help on using the changeset viewer.