Commits

Kirill Simonov committed 0f89260

Added a workaround against #116 (Thanks Andrey Somov).

Comments (0)

Files changed (1)

lib/yaml/emitter.py

             return tag
         handle = None
         suffix = tag
-        for prefix in self.tag_prefixes:
+        prefixes = self.tag_prefixes.keys()
+        prefixes.sort()
+        for prefix in prefixes:
             if tag.startswith(prefix)   \
                     and (prefix == u'!' or len(prefix) < len(tag)):
                 handle = self.tag_prefixes[prefix]