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.
db_update_face_cluster_ids_batchinfaces.pyhas two problems:except Exceptioninstead ofsqlite3.Errorprint("Error updating face cluster IDs in batch.")instead of proper loggingProposed fix
except Exceptionwithexcept sqlite3.Errorprint()withlogger.error()import loggingandlogger = logging.getLogger(__name__)I'd like to fix this if maintainers agree.