diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-01-29 16:40:46 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2012-01-29 16:40:46 -0600 |
commit | e8ba2223fa2bf79e8998dfbb54794b6a1cb93e63 (patch) | |
tree | a90ad06b46356269d304a7243f0853be26880cfb | |
parent | a5e03db6c2d16581251802bcf1eeae1a7c1f2d9f (diff) | |
download | mediagoblin-e8ba2223fa2bf79e8998dfbb54794b6a1cb93e63.tar.lz mediagoblin-e8ba2223fa2bf79e8998dfbb54794b6a1cb93e63.tar.xz mediagoblin-e8ba2223fa2bf79e8998dfbb54794b6a1cb93e63.zip |
Also switch database_current_migration to a property
-rw-r--r-- | mediagoblin/db/sql/util.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/db/sql/util.py b/mediagoblin/db/sql/util.py index 33d2c59b..d9ce7d2b 100644 --- a/mediagoblin/db/sql/util.py +++ b/mediagoblin/db/sql/util.py @@ -88,6 +88,7 @@ class MigrationManager(object): # If no migrations have been set, we start at 0. return 0 + @property def database_current_migration(self): """ Return the current migration in the database. @@ -110,7 +111,7 @@ class MigrationManager(object): """ assert self.database_current_migration is not None - db_current_migration = self.database_current_migration() + db_current_migration = self.database_current_migration return [ (migration_number, migration_func) @@ -145,7 +146,7 @@ class MigrationManager(object): """ Print out a dry run of what we would have upgraded. """ - if self.database_current_migration() is None: + if self.database_current_migration is None: self.printer( u'~> Woulda initialized: %s\n' % self.name_for_printing()) return u'inited' @@ -180,7 +181,7 @@ class MigrationManager(object): # Find out what migration number, if any, this database data is at, # and what the latest is. - migration_number = self.database_current_migration() + migration_number = self.database_current_migration # Is this our first time? Is there even a table entry for # this identifier? |