AOSSIE-Org / AOSSIE-Org/PictoPy

fix: replace broad Exception and print() with proper error handling in faces.py

Open
#1,222 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
283
Forks
679
Avg merge
7d 2h
Merged PRs (30d)
3

Description

`db_update_face_cluster_ids_batch` in `faces.py` has two problems:

- Uses broad `except Exception` instead of `sqlite3.Error`
- Uses `print("Error updating face cluster IDs in batch.")` instead of proper logging

### Proposed fix
- Replace `except Exception` with `except sqlite3.Error`
- Replace `print()` with `logger.error()`
- Add `import logging` and `logger = logging.getLogger(__name__)`

I'd like to fix this if maintainers agree.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.