Fix processing files

This commit is contained in:
Antonio J. Delgado 2023-10-02 20:41:44 +03:00
parent 1a62499167
commit e06f7bb03a
3 changed files with 8 additions and 8 deletions

View file

@ -81,14 +81,14 @@ class image_classifier:
entries = list()
count = 0
for entry in os.scandir(directory):
count += 1
if count > limit:
break
entries.append(entry)
if not entry.name.startswith('.') and entry.is_file():
count += 1
if count > limit:
break
entries.append(entry)
self._log.info(f"Processing {len(entries)} files...")
for entry in entries:
if not entry.name.startswith('.') and entry.is_file():
self.process_file(entry.path)
self.process_file(entry.path)
def count(self, iterable):
''' Return the length of an iterable that can't be count with len()'''

View file

@ -1,6 +1,6 @@
[metadata]
name = image_classifier
version = 0.0.14
version = 0.0.15
[options]
packages = image_classifier

View file

@ -9,7 +9,7 @@ if os.access(requirements_file, os.R_OK):
setuptools.setup(
scripts=['image_classifier/image_classifier.py'],
author="Antonio J. Delgado",
version='0.0.14',
version='0.0.15',
name='image_classifier',
author_email="antoniodelgado@susurrando.com",
url="",