add dirname

This commit is contained in:
Antonio J. Delgado 2022-05-30 11:50:56 +03:00
parent c9af9a815f
commit d983df1815

View file

@ -117,6 +117,7 @@ class image_classifier:
''' Obtain the file date from EXIF metadata or the file name. Return None
if it's not accessible or 'unknown-time' if it can't determine the date'''
file_date = None
dirname = os.path.dirname(os.path.realpath(file))
filename = os.path.basename(file)
if not os.access(file, os.R_OK):
self._log.error(f"The file '{file}' is not readable.")