Fix a python2.6 compatibility issue. Removing a dict comprehension.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 18 Aug 2014 15:40:08 +0000 (10:40 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 18 Aug 2014 15:40:08 +0000 (10:40 -0500)
This commit sponsored by Christopher Beppler.  Thanks!

mediagoblin/db/migrations.py

index b90140457856a3d0cbed518aaf5e76e229c427ff..04588ad1462ebd136a6b73e332b81fa7d42124b9 100644 (file)
@@ -837,7 +837,8 @@ def revert_username_index(db):
     """
     metadata = MetaData(bind=db.bind)
     user_table = inspect_table(metadata, "core__users")
-    indexes = {index.name: index for index in user_table.indexes}
+    indexes = dict(
+        [(index.name, index) for index in user_table.indexes])
 
     # index from unnecessary migration
     users_uploader_index = indexes.get(u'ix_core__users_uploader')