dbupdate: Correctly handle plugin foundations
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 25 Mar 2016 22:26:07 +0000 (15:26 -0700)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 26 Mar 2016 18:39:08 +0000 (11:39 -0700)
* mediagoblin/gmg_commands/dbupdate.py (run_foundations):
  When adding a plugin's foundations, correctly append both
  the name and the foundations in a tuple to the list.
  This prevents errors.

mediagoblin/gmg_commands/dbupdate.py

index 8ec78c7331ee88b964baa96d86fa94fd68325cc2..bafe76bb01e96e543d322d3786ecbf1b406c2225 100644 (file)
@@ -117,7 +117,7 @@ def run_foundations(db, global_config):
         try:
             foundations = import_component(
                 '{0}.models:FOUNDATIONS'.format(plugin))
-            all_foundations.append(foundations)
+            all_foundations.append((plugin, foundations))
         except ImportError as exc:
             continue
         except AttributeError as exc: