Simon Law avatar Simon Law committed 28a08f2

Extract print_status() out of Migrator.migrate()

Comments (0)

Files changed (1)

south/migration/__init__.py

         self.db_dry_run = db_dry_run
         self.verbosity = int(verbosity)
 
+    def print_status(self, migration):
+        status = self.status(migration)
+        if self.verbosity and status:
+            print status
+
     def migrate(self, migration):
         """
         Runs the specified migration forwards/backwards, in order.
         """
         app = migration.migrations._migrations
         migration_name = migration.name()
-        # Print status message
-        status = self.status(migration)
-        if self.verbosity and status:
-            print status
+        self.print_status(migration)
         # Get migration class
         klass = migration.migration().Migration
         # Find its predecessor, and attach the ORM from that as prev_orm.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.