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 摘要。