Commits

Kirill Simonov  committed b89c966

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

  • Participants
  • Parent commits 5996f3e

Comments (0)

Files changed (1)

File lib/yaml/constructor.py

     def construct_yaml_str(self, node):
         value = self.construct_scalar(node)
         try:
-            return str(value)
+            return value.encode('ascii')
         except UnicodeEncodeError:
             return value