Commits

Kirill Simonov  committed 35a90fb

Fix a bug in Representer.represent_object: copy_reg.dispatch_table was not correctly handled.

  • Participants
  • Parent commits 5d8e6ae

Comments (0)

Files changed (1)

File lib/yaml/representer.py

 
         cls = type(data)
         if cls in copy_reg.dispatch_table:
-            reduce = copy_reg.dispatch_table[cls]
+            reduce = copy_reg.dispatch_table[cls](data)
         elif hasattr(data, '__reduce_ex__'):
             reduce = data.__reduce_ex__(2)
         elif hasattr(data, '__reduce__'):