Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
minhtuevo committed Jul 2, 2024
1 parent 83e0f52 commit 21f7a8c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions fiftyone/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,12 @@ def load_dataset(name, create_if_missing=False):
Returns:
a :class:`Dataset`
"""
try:
if dataset_exists:
return Dataset(name, _create=False)
except MissingDatasetError as ex:
if create_if_missing:
return Dataset(name)
else:
raise ex
elif create_if_missing:
return Dataset(name)
else:
raise MissingDatasetError(name)


def get_default_dataset_name():
Expand Down

0 comments on commit 21f7a8c

Please sign in to comment.