Raise NoClosestPhotoDB when FileNotFound.
This commit is contained in:
parent
57d311569f
commit
219b1ca5bb
1 changed files with 11 additions and 6 deletions
|
@ -1638,12 +1638,17 @@ class PhotoDB(
|
||||||
|
|
||||||
path = possible
|
path = possible
|
||||||
log.debug('Found closest PhotoDB at "%s".', path.absolute_path)
|
log.debug('Found closest PhotoDB at "%s".', path.absolute_path)
|
||||||
|
|
||||||
|
try:
|
||||||
photodb = cls(
|
photodb = cls(
|
||||||
data_directory=path,
|
data_directory=path,
|
||||||
create=False,
|
create=False,
|
||||||
*args,
|
*args,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
except FileNotFoundError:
|
||||||
|
raise exceptions.NoClosestPhotoDB(starting.absolute_path)
|
||||||
|
|
||||||
return photodb
|
return photodb
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
|
|
Loading…
Reference in a new issue