Added hooke.util.yaml fixing YAML/NumPy type issues (by dropping data).
[hooke.git] / hooke / playlist.py
index b996a5f7777c460de74268c528e1897c4e7a7eb2..3380bfcacfc4ca24a02f4ee49e11c89370fa9cd0 100644 (file)
@@ -27,24 +27,6 @@ import os
 import os.path
 import types
 
-if False: # YAML dump debugging code
-    """To help isolate data types etc. that give YAML problems.
-
-    This is usually caused by external C modules (e.g. numpy) that
-    define new types (e.g. numpy.dtype) which YAML cannot inspect.
-    """
-    import yaml.representer
-    import sys
-    def ignore_aliases(data):
-        print data, type(data)
-        sys.stdout.flush()
-        if data in [None, ()]:
-            return True
-        if isinstance(data, (str, unicode, bool, int, float)):
-            return True
-    yaml.representer.SafeRepresenter.ignore_aliases = staticmethod(
-        ignore_aliases)
-
 import yaml
 from yaml.representer import RepresenterError