Commits

Mitsukuni Sato committed cd6b454

settings内の属性を検査するように変更した

Comments (0)

Files changed (1)

south/db/__init__.py

     db_engines = dict([
         # Note we check to see if contrib.gis has overridden us.
         (alias, "south.db.%s" % engine_modules.get(db_settings['ENGINE'], None))
-        for alias, db_settings in settings.DATABASES.items() if settings.SOUTH_DATABASE_ADAPTERS.has_key(alias)
+        for alias, db_settings in settings.DATABASES.items() \
+            if hasattr(settings, 'SOUTH_DATABASE_ADAPTERS') \
+            and alias in settings.SOUTH_DATABASE_ADAPTERS
     ])
     # Update with any overrides
     db_engines.update(getattr(settings, "SOUTH_DATABASE_ADAPTERS", {}))