Skip to content

Commit

Permalink
Close the store before raising SchemaUpgradeNeeded to avoid a lock
Browse files Browse the repository at this point in the history
  • Loading branch information
abompard committed Dec 2, 2013
1 parent 44ba756 commit 5983de4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions kittystore/__init__.py
Expand Up @@ -55,6 +55,7 @@ def get_store(settings, debug=None, auto_create=False):
if auto_create:
search_index.upgrade(store)
else:
store.close()
raise SchemaUpgradeNeeded()

return store
Expand Down
1 change: 1 addition & 0 deletions kittystore/storm/__init__.py
Expand Up @@ -42,6 +42,7 @@ def get_storm_store(settings, search_index=None, debug=False, auto_create=False)
if auto_create:
dbschema.upgrade(store)
else:
store.close()
raise SchemaUpgradeNeeded()
cache_manager = CacheManager()
cache_manager.discover()
Expand Down

0 comments on commit 5983de4

Please sign in to comment.