Set ._digest after saving in hooke.playlist.FilePlaylist.save()
[hooke.git] / hooke / playlist.py
index dcd85b8797cabb0cc2696a548d700cb092a13445..8d889a3da3cd91c9eebb54eba745cc7dc198ea16 100644 (file)
@@ -348,6 +348,6 @@ class FilePlaylist (Playlist):
         """Saves the playlist in a XML file.
         """
         self.set_path(path)
-        f = file(self.path, 'w')
-        f.write(self.flatten())
-        f.close()
+        with open(self.path, 'w') as f:
+            f.write(self.flatten())
+            self._digest = self.digest()