Add FilePlaylist._ignored_keys for boring fields
authorW. Trevor King <wking@drexel.edu>
Wed, 2 Jun 2010 19:48:08 +0000 (15:48 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 2 Jun 2010 19:48:08 +0000 (15:48 -0400)
hooke/playlist.py

index 59daa462c4525c1e7f209a75cfbed53c3d462629..8efac4770568a3a6923c83a138317349494ad7d8 100644 (file)
@@ -122,6 +122,9 @@ class FilePlaylist (Playlist):
         super(FilePlaylist, self).__init__(drivers, name)
         self.set_path(path)
         self._digest = None
+        self._ignored_keys = [
+            'experiment',  # class instance, not very exciting.
+            ]
 
     def set_path(self, path):
         if path != None:
@@ -219,6 +222,8 @@ class FilePlaylist (Playlist):
                             os.path.expanduser(self.path))))
             curve_element.setAttribute('path', path)
             for key,value in curve.info.items():
+                if key in self._ignored_keys:
+                    continue
                 curve_element.setAttribute(key, str(value))
         string = doc.toprettyxml(encoding='utf-8')
         root.unlink() # break circular references for garbage collection