From c9af9a815fa3f829969ea2bbeb3448909cfd4b69 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 30 May 2022 11:50:10 +0300 Subject: [PATCH] read filename --- image_classifier/image_classifier.py | 1 + 1 file changed, 1 insertion(+) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index 2ba7665..0e36ac3 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -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 + filename = os.path.basename(file) if not os.access(file, os.R_OK): self._log.error(f"The file '{file}' is not readable.") else: