Raise NoClosestPhotoDB when FileNotFound.

This commit is contained in:
voussoir 2022-09-07 18:06:50 -07:00
parent 57d311569f
commit 219b1ca5bb
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -1638,12 +1638,17 @@ class PhotoDB(
path = possible
log.debug('Found closest PhotoDB at "%s".', path.absolute_path)
try:
photodb = cls(
data_directory=path,
create=False,
*args,
**kwargs,
)
except FileNotFoundError:
raise exceptions.NoClosestPhotoDB(starting.absolute_path)
return photodb
def __del__(self):