Skip to content

Commit

Permalink
Small to change in get_record_store() function, to ensure that a Sh…
Browse files Browse the repository at this point in the history
…elveRecordStore trying to open an sqlite (Django) database doesn't break things.
  • Loading branch information
apdavison committed Jun 17, 2015
1 parent 6097720 commit 2c8d8cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sumatra/recordstore/__init__.py
Expand Up @@ -43,6 +43,10 @@ def get_record_store(uri):
"""
for record_store_class in get_registered_components(RecordStore).values():
if record_store_class.accepts_uri(uri):
store = record_store_class(uri)
return store
try:
store = record_store_class(uri)
except Exception: # e.g. anydbm.error
continue
else:
return store
return DefaultRecordStore(uri)

0 comments on commit 2c8d8cc

Please sign in to comment.