Changeset 251

Show
Ignore:
Timestamp:
05/05/07 15:03:39 (1 year ago)
Author:
xi
Message:

Make the encoding of the unicode->str conversion explicit; fix [52].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pyyaml/trunk/lib/yaml/constructor.py

    r235 r251  
    380380        value = self.construct_scalar(node) 
    381381        try: 
    382             return str(value
     382            return value.encode('ascii'
    383383        except UnicodeEncodeError: 
    384384            return value