Skip to content

Commit

Permalink
remove unnecessary try block
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Oct 30, 2023
1 parent 25e51a6 commit 11ebaa9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/disease/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ga4gh.core import core_models

from disease import NAMESPACE_LOOKUP, PREFIX_LOOKUP, SOURCES_LOWER_LOOKUP, logger
from disease.database.database import AbstractDatabase, DatabaseReadException
from disease.database.database import AbstractDatabase
from disease.schemas import (
Disease,
MatchType,
Expand Down Expand Up @@ -243,11 +243,8 @@ def search(
"""
sources = dict()
for k, v in SOURCES_LOWER_LOOKUP.items():
try:
if self.db.get_source_metadata(v):
sources[k] = v
except DatabaseReadException:
continue
if self.db.get_source_metadata(v):
sources[k] = v
if not incl and not excl:
query_sources = set(sources.values())
elif incl and excl:
Expand Down

0 comments on commit 11ebaa9

Please sign in to comment.