move dirname and filename
This commit is contained in:
parent
5d2a27d186
commit
545fff5c2d
1 changed files with 2 additions and 2 deletions
|
@ -69,14 +69,14 @@ class image_classifier:
|
|||
move it to the folder of the day'''
|
||||
self._log.debug(f"Looking for faces in file '{file}'...")
|
||||
new_path = False
|
||||
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.")
|
||||
else:
|
||||
if self.is_image(file):
|
||||
self.metadata = pyexiv2.ImageMetadata(file)
|
||||
self.metadata.read()
|
||||
dirname = os.path.dirname(os.path.realpath(file))
|
||||
filename = os.path.basename(file)
|
||||
people = self.find_faces(file)
|
||||
if people:
|
||||
self._log.debug(f"Found {len(people)} known people in the image.")
|
||||
|
|
Loading…
Reference in a new issue