AOSSIE-Org / AOSSIE-Org/PictoPy

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

未关闭
#1,222 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
283
派生
679
平均合并
7 天 2 小时
30 天内合并 PR
3

描述

`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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。