Show absolute path instead of pathclass object in NoClosestPhotoDB.

This commit is contained in:
voussoir 2021-05-16 16:58:53 -07:00
parent 1a944f574e
commit 399d27bb44
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB
2 changed files with 2 additions and 2 deletions

View file

@ -203,7 +203,7 @@ class NoClosestPhotoDB(EtiquetteException):
For calls to PhotoDB.closest_photodb where none exists between cwd and For calls to PhotoDB.closest_photodb where none exists between cwd and
drive root. drive root.
''' '''
error_message = 'There is no PhotoDB in {} or its parents.' error_message = 'There is no PhotoDB in "{}" or its parents.'
class NoYields(EtiquetteException): class NoYields(EtiquetteException):
''' '''

View file

@ -1967,7 +1967,7 @@ class PhotoDB(
break break
parent = path.parent parent = path.parent
if path == parent: if path == parent:
raise exceptions.NoClosestPhotoDB(cwd) raise exceptions.NoClosestPhotoDB(cwd.absolute_path)
path = parent path = parent
path = path.with_child(constants.DEFAULT_DATADIR) path = path.with_child(constants.DEFAULT_DATADIR)