diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-11-18 09:34:09 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-11-18 09:34:09 -0600 |
commit | 817066506d846d06d0489dfb42b8200b86f61153 (patch) | |
tree | 36578ed7e5b2b205c919fcfb8929c8fc33a79c3f /mediagoblin/db/util.py | |
parent | 76c6c806caec7af20a3fe11c04bb783baacc3934 (diff) | |
parent | 3618a9ac5112c657fd095a0f9cbd346921a4e800 (diff) | |
download | mediagoblin-817066506d846d06d0489dfb42b8200b86f61153.tar.lz mediagoblin-817066506d846d06d0489dfb42b8200b86f61153.tar.xz mediagoblin-817066506d846d06d0489dfb42b8200b86f61153.zip |
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Conflicts:
mediagoblin/templates/mediagoblin/user_pages/user.html
Diffstat (limited to 'mediagoblin/db/util.py')
-rw-r--r-- | mediagoblin/db/util.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/db/util.py b/mediagoblin/db/util.py index 84a6cbce..52e97f6d 100644 --- a/mediagoblin/db/util.py +++ b/mediagoblin/db/util.py @@ -118,11 +118,12 @@ def remove_deprecated_indexes(database, deprecated_indexes=DEPRECATED_INDEXES): ################# # The default migration registry... -# +# # Don't set this yourself! RegisterMigration will automatically fill # this with stuff via decorating methods in migrations.py -class MissingCurrentMigration(Exception): pass +class MissingCurrentMigration(Exception): + pass MIGRATIONS = {} @@ -147,7 +148,7 @@ class RegisterMigration(object): """ def __init__(self, migration_number, migration_registry=MIGRATIONS): assert migration_number > 0, "Migration number must be > 0!" - assert not migration_registry.has_key(migration_number), \ + assert migration_number not in migration_registry, \ "Duplicate migration numbers detected! That's not allowed!" self.migration_number = migration_number |