Commits

Adrian Sampson committed 666f7b3

random: py26 fix

Comments (0)

Files changed (2)

         # Group the objects by artist so we can sample from them.
         key = attrgetter('albumartist')
         objs.sort(key=key)
-        objs_by_artists = {artist: list(v) for artist, v in groupby(objs, key)}
+        objs_by_artists = {}
+        for artist, v in groupby(objs, key):
+            objs_by_artists[artist] = list(v)
 
         objs = []
         for _ in range(opts.number):
 * :doc:`/plugins/scrub`: Handle and log I/O errors.
 * :doc:`/plugins/lyrics`: The Google backend should now turn up more results.
   Thanks to Fabrice Laporte.
+* :doc:`/plugins/random`: Fix compatibility with Python 2.6. Thanks to
+  Matthias Drochner.
 
 
 1.2.0 (June 5, 2013)